I've been trying to do the initials program, I am able to get the first initial but not the rest of the initial after a ' '. Sarcastically, my program runs... but it comes out like this:
This is a copy of the crazy code I've come up with.
#include <stdio.h>
#include <cs50.h>
int main(void)
{
char initial1;
char y;
string name;
int x = 0;
//getting a persons name
printf("please enter your name:\n");
name = GetString();
//code for getting 1st initial
initial1 = name[0];
// getting other initials
while (x == ' ')
{
y = name[x] + 1;
}
// output of initials
printf("your initials are:%c and %c\n", initial1, y);
HEEELP