ITT: We try to make the ugliest "hello world" program we can, in c++
#include
int main ()
{
int x = 10;
int z = 0;
if (x>6)
{
std::cout
ITT: We try to make the ugliest "hello world" program we can, in c++
#include
int main ()
{
int x = 10;
int z = 0;
if (x>6)
{
std::cout
abort()
#include
int main()
{
char g=16777288,
r=16777317,
e=16777324,
t=16777327,
sp=16777248,
w=16777303,
o=16777327,
R=16777330,
l=16777324,
d=16777316,
ex=16777249;
std::cout
>C++
what do you mainly use?
I write all my code for internal use by the government of Beatrice, Nebraska in SNOBOL4.
$h = "h";
$e = "e";
$l = "l";
$l2 = "l";
$o = "o";
$w = "w";
$o2 = "o";
$r = "r";
$l3 = "l";
$d = "d";
$j = 0;
for ($j = 1; $j < 5; $j++) {
if (1 == 1) {
echo $h . $e . $l3 . $l . $o . " " . $w . $o2 . $r . $l1 . $d;
$j = 100;
}
}
#include
int main ()
{
std::cout
sepples is the perfect language for writing ugly code
I am a simple girl, sorry.
int main(){
char c;
char string[15] = {'H', 'e', 'l', 'l', 'o', ' ', 'W', 'o', 'r', 'l', 'd', '\n'};
for(int i = 0; c != '\n'; i++){
for(c = 0; c != string[i]; c++);
std::cout
#include
using namespace std;
int main() {
cout
Fuck off faggot retard you just read this outta a youtube comment using namespace std is fine for code that will clearly use standard things what's real ugly is the namespace every time you call something or declare a fucking string or vector
int main ()
{
int x = 10;
int z = 0;
if (x>6)
{
std::cout
You're supposed to include everything that you use individually. It's much more readable and maintainable when there's a list of all your imports at the top of your source file.
there's no way to do something so simple so bad without making it arbitrarily complex
retard. `using namespace` defeats the point of having a namespace in the first place.
#include
using namespace std;
int main()
{
char a,b,c,d,e,f,g,h,i,j;
cout > a;
if (a == 'H') {
cout > b;
if (b == 'e') {
cout > c;
if (c == 'l') {
cout > d;
if (d == 'l') {
cout > e;
if (e == 'o') {
cout > f;
if (f == 'w') {
cout > g;
if (g == 'o') {
cout > h;
if (h == 'r') {
cout > i;
if (i == 'l') {
cout > j;
if (j == 'd') {
cout
public static String randomString(int i) {
Random ran = new Random(i);
StringBuilder sb = new StringBuilder();
while (true) {
int k = ran.nextInt(27);
if (k == 0) break;
sb.append((char)('`' + k));
}
return sb.toString();
}
public static void main(String args[]) {
System.out.println(randomString(-229985452) + " " + randomString(-147909649));
}
>in c++
it's already uglier than any other language
Here's a challenge: in C++, write a function that will return "Hello world" (as a std::string) without using the letters h, e, l, o, w, r, d. The only words with those letters you're allowed to use are std, string, and return.
auto helloWorld()
{
char arr[] = {72, 101, 108, 108, 111, 32, 87, 111, 114, 108, 100};
return std::string{arr, sizeof arr / sizeof *arr};
}
I should rephrase. You're not allowed to use the letters in your code at all except for those three words, so you can't use char, arr, or sizeof.
>ugly c++
>no template cancer
Are you even trying?
this
class HelloWorld {
void main(String[] args) {
System.out.println("Hello World!");
}
}
What do I win?
nvm, I'm retarded - didn't read OP
#include
#include
void main()
{
std::string toPrint;
bool done = false;
for (int i = 0; !done; i++)
{
if (i == 0)
toPrint += 'H';
else if (i == 1)
toPrint += 'e';
else if (i == 2)
toPrint += 'l';
else if (i == 3)
toPrint += 'l';
else if (i == 4)
toPrint += 'o';
else if (i == 5)
toPrint += ' ';
else if (i == 6)
toPrint += 'W';
else if (i == 7)
toPrint += 'o';
else if (i == 8)
toPrint += 'r';
else if (i == 9)
toPrint += 'l';
else if (i == 10)
toPrint += 'd';
else if (i == 11)
{
toPrint += '!';
done = true;
}
}
std::cout
faster
I think you won anyway
C++ is beautiful though...
OP here. I left, and expected this thread to die, but it's nice to see it flourish.