//Faça um programa que verifique se uma letra digitada é "F" ou"M".
#include <stdio.h>
#include <stdlib.h>
main() {
    char sx;
    
    printf("Digite uma letra:");
    scanf("%c",&sx);
    
    if(sx=='m'||sx=='M'){
        printf("\nM - Masculino");
    }else if(sx=='f'|| sx=='F'){
        printf("\nF - Feminino");
    }else{
        printf("\nSexo inválido!");
    }
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: