Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //IFF - Introdução à Programação
- //Slide - Página 25 - Exercício 3
- #include<stdio.h>
- #include<locale.h>
- int main(){
- setlocale(LC_ALL, "Portuguese");
- char eC;
- printf("Entre com seu estado civíl: \nS - Solteiro(a) \nC - Casado(a) \nD - Divorciado(a) \nV - Viúvo(a)\n");
- printf("Resposta:");
- eC=getchar();
- switch (eC){
- case 'S':
- printf("Solteiro(a).");
- break;
- case 'C':
- printf("Casado(a).");
- break;
- case 'D':
- printf("Divorciado(a).");
- break;
- case 'V':
- printf("Viúvo(a).");
- break;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment