/* File: if6.c Testing && and || */ #include int main() { char shoes, shirt, cr ; printf("No shoes, No shirt, No Service\n") ; printf("Are you wearing shoes? (y/n) ") ; scanf("%c%c", &shoes, &cr) ; printf("Are you wearing a shirt? (y/n) ") ; scanf("%c%c", &shirt, &cr) ; if ( shoes == 'y' && shirt == 'y') { printf("You are properly dressed, come in!\n") ; } else { printf("Please put on some decent clothes!\n") ; } return 0 ; }