Advertisement
weldisalves

Lista 04 - exercício 16

Jun 21st, 2013
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.33 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <string.h>
  3. #define MAX 50
  4.  
  5. //16. Solicite o nome do usuário, em seguida exiba-o na console.
  6.  
  7. int main()
  8. {
  9.     char nome[MAX];
  10.  
  11.     printf("\n Digite seu nome: ");
  12.     __fpurge(stdin);
  13.     fgets(nome,MAX,stdin);
  14.  
  15.     printf("\n Nome digitado: \n %s",nome);
  16.  
  17.     getchar();
  18.     return 0;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement