#include <stdio.h>
int main()
{
int age ;
printf ("Enter the person's age: ") ;
scanf ("%d", age) ;
fflush(stdin) ;
if (age <0 && >10)
printf ("The persons age is:%d.Person is a child", age) ;
else
if (age <11 && >19)
printf ("The persons age is:%d. Person is a teenager", age) ;
else
if (age <20 && >29)
printf ("The persons age is:%d. Person is in there twenties", age) ;
else
if (age <30 && >39)
printf ("The persons age is:%d. Person is in there thirties", age) ;
else
if (age >40)
printf ("The persons age is:%d. Person is old and dieing", age) ;
return 0 ;
}
It says "Error before '>' token"
What am I doing wrong?
int main()
{
int age ;
printf ("Enter the person's age: ") ;
scanf ("%d", age) ;
fflush(stdin) ;
if (age <0 && >10)
printf ("The persons age is:%d.Person is a child", age) ;
else
if (age <11 && >19)
printf ("The persons age is:%d. Person is a teenager", age) ;
else
if (age <20 && >29)
printf ("The persons age is:%d. Person is in there twenties", age) ;
else
if (age <30 && >39)
printf ("The persons age is:%d. Person is in there thirties", age) ;
else
if (age >40)
printf ("The persons age is:%d. Person is old and dieing", age) ;
return 0 ;
}
It says "Error before '>' token"
What am I doing wrong?