Advertisement
Guest User

Untitled

a guest
Mar 23rd, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <string.h>
  3.  
  4. void Cap(char string[]){
  5. int i;
  6. int x = strlen(string);
  7. for (i=1;i<x;i++){
  8. if (isalpha(string[i]) && string[i-1] == ' '){
  9. string[i]= toupper(string[i]);
  10. }
  11. }
  12. }
  13.  
  14. main(){
  15. char string[] = "texto en minuscula.";
  16. Cap(string);
  17. printf("%s",string);
  18. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement