Here's the code I used:
Code:
#include<stdio.h>
int main()
{
int age;
printf( "Enter your age:\n" );
scanf( "%d", &age );
if (age < 35 )
{
printf( "You are pretty young!\n" );
}
else if (age == 35)
{
printf( "You are old.\n" );
}
else
{
printf( "You are really old!\n" );
}
getchar();
return 0;
}
So if I type 30 and hit return, I should instantly see "You are pretty young!" right?
But that's not happening. If I exit to the code page and press Control + F9 once again, I can see "You are pretty young!" and "Enter your age:" in a new line. What's wrong?
I'm a beginner... started only today... so please be nice and explain in simple words! Thanks!