1 00:00:00,000 --> 00:00:00,460 2 00:00:00,460 --> 00:00:02,251 >> ZAMYLA CHAN: In the initials problem, we're 3 00:00:02,251 --> 00:00:04,320 going to prompt the user for their name and then 4 00:00:04,320 --> 00:00:07,000 print the initials from that name. 5 00:00:07,000 --> 00:00:09,750 To prompt the user for the name, we'll use the get_string function 6 00:00:09,750 --> 00:00:11,670 found in the CS 50 library. 7 00:00:11,670 --> 00:00:14,000 >> You're allowed to make two assumptions-- one, 8 00:00:14,000 --> 00:00:17,010 that the string will be comprised of only letters and spaces-- so 9 00:00:17,010 --> 00:00:19,152 no numbers, no other characters. 10 00:00:19,152 --> 00:00:21,110 You're also allowed to assume that there's only 11 00:00:21,110 --> 00:00:25,420 going to be a single space between letters, between names. 12 00:00:25,420 --> 00:00:29,560 >> So once you have that string, then let's go to print the initials. 13 00:00:29,560 --> 00:00:32,740 In this example, say I were to be a perfect user. 14 00:00:32,740 --> 00:00:36,040 Then I'd type in my name with a capital Z and a capital C, 15 00:00:36,040 --> 00:00:37,940 with a single space in between. 16 00:00:37,940 --> 00:00:40,360 So your program would calculate the first letter 17 00:00:40,360 --> 00:00:44,860 and then the first letter after a space, and print out ZC. 18 00:00:44,860 --> 00:00:47,710 >> But for instance, say Mile Banana is at the keyboard. 19 00:00:47,710 --> 00:00:50,240 Well, he might be a little bit sloppier than I 20 00:00:50,240 --> 00:00:54,890 am and only type in lowercase letters and include an extra space 21 00:00:54,890 --> 00:00:56,870 in front of his first name. 22 00:00:56,870 --> 00:00:59,890 But your program should have the same exact output, 23 00:00:59,890 --> 00:01:03,440 with a capital MB without any spaces. 24 00:01:03,440 --> 00:01:06,600 >> Finally, whenever you've determined the characters to print, 25 00:01:06,600 --> 00:01:11,360 make sure that you print them as uppercase using the toupper function. 26 00:01:11,360 --> 00:01:15,870 >> My name is ZC, and this was initials. 27 00:01:15,870 --> 00:01:18,482