-
-
Save anonymous/a50582c43587cd3c45d38e9e0c4f956a to your computer and use it in GitHub Desktop.
initials.c - shared from CS50 IDE
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <cs50.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <ctype.h> | |
int main (void) { | |
string s = GetString(); | |
printf("%c", toupper (s[0])); | |
for ( int i=0; i<strlen(s); i++ ){ | |
if (s[i] == 32){ | |
printf ("%c", toupper (s[i+1])); | |
} | |
} | |
printf ("\n"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment