Advertisement
hmcristovao

Lista 04 - exercício 16

May 17th, 2012
420
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.28 KB | None | 0 0
  1. #include <stdio.h>
  2. int main() {
  3.    char nome[50];
  4.  
  5.    printf("Qual o seu nome?");
  6.    gets(nome);
  7.  
  8.    int i;
  9.    for(i=0; nome[i] != '\0'; i++)
  10.       printf("%c", nome[i]);
  11.  
  12.    // as 3 linhas anteriores poderiam ser substituídas por:
  13.    // printf("%s", n);
  14.  
  15.    return 0;
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement