another noob question
Posted: Sat Jul 31, 2010 8:58 am
could any of you explain what a "conditional statement" is and how can i use it?, the simpler it is the better
int count;
int number;
if(count<100) //if count value is under 100
{
number+=1; //add number by 1
}
int loop;
int number;
for(loop=0;loop<100;loop++) //for loop is equal 0 and under 100, add loop by 1
{
number+=1; //add number by 1 while adding the loop
}
int loop;
int number;
while(loop<100) //while loop value is under 100
{
number+=1; //add number by 1
}
if(jump==1)
{
yvelocity=-8;
jump=0;
}
else
{
yvelocity=2;
}