hey new bies check this out

Started by
14 comments, last by Samsonite 18 years, 11 months ago
im a newbie to i have just come up with a really funny program if u enter ur age below 17 it says ur at a cool age ( cos im 15) if u enter ur age above 20 its says your ancient (carries on) if u enter in between 17 and 20 it will say not to old i suppose enter this nect code and compile tell me what u think experts tell me what i can do to improve or change it slightly to be funnier please thanx
------------------------------------------------------------GDSFUBY GameDev Society For UnBanning YodaTheCodaIf you want to see yoda unbanned then put this in your sig------------------------------------------------------------
Advertisement
crap i forgot the code
here u go

#include <iostream.h>

using namespace std;

int main()
{
int age;

cout<<"please input your age: ";
cin>> age;
cin.ignore();
if ( age < 17 ) {
cout<<"you are at a cool age\n";
}
else if ( age > 20 ) {
cout<<"whoah your ancient how good a mate was jesus at school\n";
cout<<"only joking\n";
}
else {
cout<<"not to old i suppose\n";
}
cin.get();
}




me stupid i forget the most important bit derrr
------------------------------------------------------------GDSFUBY GameDev Society For UnBanning YodaTheCodaIf you want to see yoda unbanned then put this in your sig------------------------------------------------------------
Well, somebody's going to point it out sooner or later:

Use
#include <iostream>
not
#include <iostream.h>


The STL headers without ".h" are the newer standard.
oh never new that told u i was new
------------------------------------------------------------GDSFUBY GameDev Society For UnBanning YodaTheCodaIf you want to see yoda unbanned then put this in your sig------------------------------------------------------------
Hmmm.... Jesus was pretty cool, I guess. Always changing my chocolate milk into vodka for me and all.
----------------------------------------------------------No matter how eloquently you state your argument, the fact remains that the toilet seat is a bistable device. Therefore it's natural position is no more down than it is up.[SDL Smooth Tile Scrolling]
While people are pointing things out, I might as well let you know that it's 'too', not 'to' in the sentence "Not too old, I suppose." ;)
ha ha waisted droid
just how old r u lot here am i the yungest
------------------------------------------------------------GDSFUBY GameDev Society For UnBanning YodaTheCodaIf you want to see yoda unbanned then put this in your sig------------------------------------------------------------
CanI safely assume that if I enter 15, your program will say "doodz, u rulz0rz teh l4zy l337-like sms 2p34k wihc is unradabel by teh ancient".

This is a forum, you have some time to type your text before anyone will answer, and believe it or not, but you are (not 'your', remember this) allowed to use this time to write more correct English sentences.

Anyway, you should replace those "\n" with std::endl, just like in this statement:

std::cout << "whoah your ancient how good a mate was jesus at school" << std::endl;


And jesus was cool. Well, he ued to drink too much, but he was cool.

Regards,
sorry about not talking proper english
and no it dosnt say any thing when you type 15 im working on it ill post it on here when its fully done this is just a prototype
------------------------------------------------------------GDSFUBY GameDev Society For UnBanning YodaTheCodaIf you want to see yoda unbanned then put this in your sig------------------------------------------------------------
Putting a little more effort into your grammar would be nice.

Quote:
I'm a newbie, too. I have just came up with a really funny program.

If you enter an age below 17 it says you're at a cool age, and if you enter an age above 20 it says you're ancient. If you enter an age between 17 and 20 it will say "not to old i suppose".

Compile this code and tell me what you think. Please tell me what I can do to improve it or make it funnier. Thanks.


To which I might reply

#include <iostream>#include <limits>using namespace std;int main() {  int age;    cout<<"Please input your age: "<<flush;    if(cin>>age)   {    if(age <= 5)     cout<<"Why do I not believe you?";    else if(age <= 16)     cout<<"That's a cool age.";    else if(age <= 20)     cout<<"That's about average I suppose.";    else if(age <= 90)     cout<<"Woah! You're ancient!\nOnly joking.";    else     cout<<"Why aren't you dead yet?";   }  else   cout<<"I have no idea what that means.";    cin.ignore(numeric_limits<int>::max(), '\n');    cout<<"\n\nPress enter to quit."<<endl;  cin.get(); }
Chess is played by three people. Two people play the game; the third provides moral support for the pawns. The object of the game is to kill your opponent by flinging captured pieces at his head. Since the only piece that can be killed is a pawn, the two armies agree to meet in a pawn-infested area (or even a pawn shop) and kill as many pawns as possible in the crossfire. If the game goes on for an hour, one player may legally attempt to gouge out the other player's eyes with his King.

This topic is closed to new replies.

Advertisement