| Welcome | |
|---|---|
|
Welcome to the forums of AntiRTFM's Absolute N00b Spoonfeed C++ Tutorials! You are currently viewing our boards as a guest, which gives you limited access to view most discussions and access our other features. By joining our free community, you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content, and access many other special features. Registration is fast, simple, and absolutely free, so please, <a href="/profile.php?mode=register">join our community today</a>! |
|
for (x=1;x<25;x++)
{ cout << "helloworld";}while (x++<25)
{ cout << "helloworld";} if (x>12)
{do something involving ending the program} 5) the obvious "write 'hello kitty' 24 times" method 6) you could make 24 strings that all mean "hello kitty" then just print them all to the screen.for ( int t = 0; t <= 24; t++ )
{
std::cout << "Hello world";
for(int x = 0; x <= t; x++) cout << "!";
cout << endl;
}for (int a = 1; a <= 24; a++) cout << "hello world";int x =1;
while (x <= 24)
{
cout << "hello world";
x++;
}int x =1;
do {
cout << "hello world";
x++;
} while (x <= 24);for (int x = 1; x <= 24; x++, cout << "hello world") ;int x =1;
for (;;)
{
cout << "hello world";
x++;
if (x > 24) break;
}int x=0;
for (; x++ <= 24;) cout << "hello world";int x=1;
while (x++ <= 24) cout << "hello world";
int x =1;
while (true)
{
cout << "hello world";
x++;
if (x > 24) break;
}int x =24;
while (x--) cout << "hello world";
int x=0;
do {
cout << "hello world";
} while (++x <= 24);int main() {short i=0; begin: if (i++ < 24) {cout << "Hello world\n"; goto begin;}}
#include "stdafx.h"
#include <iostream>
using namespace std;
int main()
{
wtf:
cout << "Hello world! \n";
cout << "Hello world!! \n";
cout << "Hello world!!! \n";
cout << "Hello world!!!! \n";
cout << "Hello world!!!!! \n";
cout << "Hello world!!!!!! \n";
cout << "Hello world!!!!!!! \n";
cout << "Hello world!!!!!!!! \n";
cout << "Hello world!!!!!!!!! \n";
cout << "Hello world!!!!!!!!!! \n";
cout << "Hello world \n";
cout << "Hello world \n";
cout << "Hello world \n";
cout << "Hello world \n";
cout << "Hello world \n";
cout << "Hello world \n";
cout << "Hello world \n";
cout << "Hello world \n";
cout << "Hello world \n";
cout << "Hello world \n";
cout << "Hello world \n";
cout << "Hello world \n";
cout << "Hello world \n";
cout << "Hello world \n";
goto wtf;
}#include <iostream>
#include <string>
using namespace std;
int main()
{
string whatToWrite;
int howManyTimes;
cout << "ok lets spam a word! :) so type how many time we should spam word" << endl;
cin>>howManyTimes;
cout<<"ok now what word you wana spam?: ";
cin>>whatToWrite;
for (int limit = 0; limit < howManyTimes ; ++limit )
{
cout<< whatToWrite ;
}
return 0;
}
int main()
{
srand((unsigned)time(0));
int rand_num; /* Used for random output switch */
int n = 1; /* Number of times executed */
while (n <= 24)
{
for( int index = 1; index < 25; index++ )
{
rand_num = (rand()%10)+1;
}
switch (rand_num) /* Make the output random */
{
case 1 :
cout << "Hello World!\n";
break;
case 2 :
cout << "Hello World!!\n";
break;
case 3 :
cout << "Hello World!!!\n";
break;
case 4 :
cout << "Hello World!?!\n";
break;
case 5 :
cout << "Hello0o World!\n";
break;
case 6 :
cout << "H3ll0w W0rld!\n";
break;
case 7 :
cout << "Hello World!?!?!\n";
break;
case 8 :
cout << "Hello World!@!!\n";
break;
case 9 :
cout << "Hello World!$!$\n";
break;
case 10:
cout << "Hello World?\n";
break;
default:
cout << "Something has gone wrong./nPlease double check the source code and try again.\n";
break;
}
n++;
}
cin.get();
return 0;
}
Users browsing this forum: No registered users and 0 guests