I need to do the following:
input First and Last name
Output initials.
Output however many letters
Input Middle name
Output Full initials.
then redo the process.
input First and Last name
Output initials.
Output however many letters
Input Middle name.
Output Full initials.
Example:
Enter your first and last name with a space between: Melvin Mathew
Your initials are MM.
Your name has 12 letters.
What's your middle name: TOM
Your full Initials are MTM.
Enter your first and last name with a space between: Melvin Mathew
Your initials are MM.
Your name has 12 letters.
What's your middle name: - (no middle name)
Your full Initials are MM.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main()
{
int i;
int countUC = 0;
int countNmb = 0;
char a[100]; /* declare array for storing string of characters */
printf("Please enter a word or press q to quit. \n");
scanf("%s", a);
if((strlen(a)==1) && (a[0]=='q'))
return 0;
printf("Your word is: %s \n",a);
printf("Number of characters: %d\n",strlen(a)); /* strlen(char_name) is a function from string.h */
return 0;
}