diogoAlves

IFF/Introdução à Programação/Slide/Pag 25/Ex 3

Feb 21st, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.54 KB | None | 0 0
  1. //IFF - Introdução à Programação
  2. //Slide - Página 25 - Exercício 3
  3. #include<stdio.h>
  4. #include<locale.h>
  5.  
  6. int main(){
  7.     setlocale(LC_ALL, "Portuguese");
  8.     char eC;
  9.     printf("Entre com seu estado civíl: \nS - Solteiro(a) \nC - Casado(a) \nD - Divorciado(a) \nV - Viúvo(a)\n");
  10.     printf("Resposta:");
  11.     eC=getchar();
  12.     switch (eC){
  13.         case 'S':
  14.             printf("Solteiro(a).");
  15.         break;
  16.         case 'C':
  17.             printf("Casado(a).");
  18.         break;
  19.         case 'D':
  20.             printf("Divorciado(a).");
  21.         break;
  22.         case 'V':
  23.             printf("Viúvo(a).");
  24.         break;
  25.     }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment