#include<stdio.h>
#include<string.h>
#include<ctype.h>
int main()
{
void convert(char[]);// function protocol, Declaring all variables
char first[90];
char middle[50];
char last[70];
int length=0;
printf("Enter first name:\n");//entering in first name
gets(first);
convert(first);
printf("Enter middle name:\n");
gets(middle);
convert(middle);
printf("Enter last name:\n");
gets(last);
convert(last);
strcat(first," ");//adding them all to string first
strcat(first,middle);
strcat(first," ");//Used to space out the name.
strcat(first,last);
length=strlen(first); //Length of string including all spaces.
printf("The string %s has %d characters.",first,length); //Displays name capitalized and spaced out including length of the string.
return 0;
} //end of main
void convert(char names[])
{//function header; converts the firt letter to upper case and all other characters to lower case.
int length;
length=strlen(names);
int i;
names[0]=toupper(names[0]);
for(i=1;i<length;i++);
names[i]=tolower(names[i]);
}// end of loop