Advertisement
Guest User

Untitled

a guest
Apr 6th, 2016
369
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <cs50.h>
  2. #include <stdio.h>
  3. #include <string.h>
  4. #include <ctype.h>
  5.  
  6.  
  7. int main(void){
  8.     string fname;
  9.     //printf("Enter ur full name: ");
  10.     fname = GetString();
  11.     printf("%c", toupper(fname[0]));
  12.     for(int count=0, ln=strlen(fname); count<ln; count++){
  13.         if(fname[count]==' ' && fname[count+1] != '\0'){
  14.             printf("%c", toupper(fname[count+1]));
  15.             count++;
  16.         }
  17.     }
  18.     printf("\n");
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement