Hi, I'm a n00b and have been doing the tutorials and I have many questions and you'll rpbably find me annoying because I really ask alot of questions daily. At the moment I have 3, I'm just gonna quote them cause I posted them on a pretty much dead board.
I was making a rock paper scissors game and suddenly realised I had about 15 if statements and realised that this can't be the way your meant to do it. Is there another way to do it? or is it all done with if and else statements?
When I was making all those if statements I wondered how you close a program? I know that it stops when you get to the bottom but how do you tell it to close after the users presses enter at a certain point, say in a if statment?
Someone told me that this is how you make x a random number srand(time(0));
int x = rand();
But I have no idea where I'm mean to put it? Where do I put it?
By the way, I'm up to lesson 9 on the tutorials if that means anything?
Thanks



LinkBack URL
About LinkBacks


