Advertisement
Guest User

Untitled

a guest
Oct 19th, 2019
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main(){
  4.  
  5. char texto[20];
  6.  
  7. printf("Informe uma palavra ate 20 caracteres:\n");
  8. gets(texto);
  9.  
  10. int contCaractere = 0;
  11.  
  12. while(texto[contCaractere] != '\0'){
  13. contCaractere++;
  14. }
  15. printf("A palavra %s possui %i caracteres.", texto, contCaractere);
  16.  
  17. return 0;
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement