| 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;}}

Users browsing this forum: No registered users and 0 guests