d3dx939dll

Aula53 - Getchar

Feb 2nd, 2021 (edited)
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.41 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main(void){
  4.  
  5.     char linha[100];
  6.     char caractere;
  7.     int i = 0;
  8.     printf("Digite Seu texto: ");
  9.     do {
  10.         caractere = getchar();
  11.         linha[i] = caractere;
  12.         ++i;
  13.     } while (caractere != '\n');
  14.     linha[i - 1] = '\0';
  15.  
  16.     printf("%s\n", linha);
  17.     return 0;
  18. }
  19.  
  20. //Sobre
  21.  
  22. //Aula: Função getchar (#53)
  23. //Data: 02/01/2021
  24.  
  25. //Referencia
  26.  
  27. //Video: https://www.youtube.com/watch?v=ahMgR8FoH-w
Add Comment
Please, Sign In to add comment