Advertisement
Guest User

Programas / Estagio Q1

a guest
Jun 27th, 2017
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.35 KB | None | 0 0
  1.  
  2. #include <stdio.h>
  3. #include <stdlib.h>
  4. #include <ctype.h>
  5. #include <string.h>
  6.  
  7. int main()
  8. {
  9.  
  10. char nome[120];
  11. int criar, i, cont=0;
  12.  
  13. printf("\n informe um nome: \n");
  14. gets(nome);
  15.  
  16. for (i=0; i<strlen(nome); i++)
  17. if (isupper(nome[i]) != 0)
  18. cont++;
  19. printf("\n o nome digitado possui %d palavras maiusculas \n", cont);
  20. return 0;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement