WAP that determines whether someone is legally an adult (age>=21), but not a senior citizen (age>=65)
void main() { int age; clrscr(); printf("Enter the age"); scanf("%d", &age); (age>=21 && age<=65)? printf("\n\nThe person is adult"):printf("\n\nThe person is not adult"):printf("\n\nThe person is not a senior citizen"); getch(); }
No comments:
Post a Comment