Program to print adult for age 18, teenager for 13 to 18 and child for below 13.
//Program to print adult for age 18, teenager for 13 to 18 and child for below 13.
#include<stdio.h>
int main()
{
int age;
printf("enter age\n");
scanf("%d", &age);
if(age>18){
printf("you are Adult");
}
else if(age>=13 && age<=18){
printf("you are teenager");
}
else{
printf("you are child");
}
return 0;
}
Output :
enter age
16
you are teenager
--------------------------------
Process exited after 8.025 seconds with return value 0
Press any key to continue . . .
Comments
Post a Comment
Please do not enter any spam link in the comment box.