#include <stdio.h>

int main(void) {
	
	char firstname[20];  /* first name */
	char middle;         /* middle initial */
	char lastname[20];   /* last name */
	
	printf ("\nEnter first name: ");
	scanf ("%s", firstname);
	
	printf ("\nEnter middle initial: ");
	scanf (" %c", &middle);  /* note the space before the %c */
	
	printf ("\nEnter last name: ");
	scanf ("%s", lastname);	
	
	/* print out the name to the screen */
	printf ("\n\nThe name read is:  %s %c %s \n", firstname, middle, lastname);
	
	return 0;
}
