#include <stdio.h>
int main() {
// Logical AND/OR in if-else
int age;
char gender;
printf("Enter your age: ");
scanf("%d", &age);
printf("Enter your gender (M/F): ");
scanf(" %c", &gender); // Note the space before %c to consume any leading whitespace
if (age >= 18 && gender == 'M') {
printf("You are an adult male.\n");
} else if (age >= 18 && gender == 'F') {
printf("You are an adult female.\n");
} else {
printf("You are not an adult.\n");
}
return 0;
}