Please bear with me, for I just started learning C today.
I'm to the second lesson for C coding, I understand what's mostly going on, but this is bugging me. Are the {} brackets supposed to be at a certain point when you're converting over to an "else" statement?
Code:
#include <stdio.h>
int main()
{
int age;
printf( "Please enter your age" );
scanf( "%d", &age );
if ( age < 100 ) {
printf ( "Your are pretty young!\n" )
} /*I'm getting an error on this spot when I try to compile.*/
else if ( age == 100 ) {
printf( "You are old\n" ?;
}
else {
printf( "You are really old\n" );
}
return 0;
}