Advertisement
michael_xgrind

Resposta

Sep 18th, 2014
271
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.43 KB | None | 0 0
  1. #include "stdio.h"
  2.  
  3. int main(){
  4.     char resp;
  5.  
  6.     printf("Digite (S)im ou (N)ao");
  7.     scanf("%c", &resp);
  8.  
  9.     switch(resp){
  10.         case 'S':
  11.         case 's':
  12.             printf("Voce respondeu SIM");
  13.             break;
  14.         case 'N':
  15.         case 'n':
  16.             printf("Voce respondeu NÃO");
  17.             break;
  18.         default:
  19.             printf("Voce respondeu incorretamente!");
  20.     }
  21.  
  22.     return 0;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement