What did I do wrong? When I compile and run it, it asks for the age but not the status (sts).Code:#include <stdio.h> int main() { float age; char sts; printf("State your age: "); scanf("%f", &age); printf("Are you working?\n "); scanf("%c", &sts); if ( age > 59 && sts == 'W' ) printf("Working senior"); else if ( age > 59 && sts != 'W') printf("Retired senior"); else if ( age < 59 && age > 20 ) printf("Adult"); else if ( age < 20 && age > 12 ) printf("Teen"); else if ( age < 12 ) printf("Child"); }
Thanks.