#include <stdio.h>
int main(void)
{
char ch[20] = { 0 };
char n1, n2;
int i = 0, j = 0;
printf("Please enter a first and last name:");
while ((ch[i] = getchar()) != '\n')
{
i++;
}
printf("You enterd the name:");
for(int i=0;i<20;i++)
{
if (ch[i] >= 'A' && ch[i] <= 'Z')
{
j++;
n1 = ch[i];
}
switch (j)
{
case 1:
n2 = n1;
break;
case 2:
if (ch[i]!=0)
{
printf("%c", ch[i]);
}
break;
}
}
printf(",");
printf("%c", n2);
return 0;
}