Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I don\'t know how to write this program. If your code works, I\'ll be sure to ra

ID: 3633415 • Letter: I

Question

I don't know how to write this program. If your code works, I'll be sure to rank you as a Lifesaver. Thanks! (We have to write our code in the computer program Code::Blocks if that has any affect on anything)

Write a program that will ask the user for a first and last name. This information will be read in by the gets() function into “one” string. The program will modify the string so that the last name is printed, followed by a comma, a space, the first initial, and a period. If the user enters a middle name, the program should print out that initial, with a period, after the first initial and last name. You may assume that the entire input will be up to 80 characters. You may assume that the user will enter two or three words. Two example runs are shown below. User input is in curved brackets { }.

Welcome to the Name Modifier 3000… Please enter your name: {George Bush}
Computing…
Name modified to: Bush, G.


Welcome to the Name Modifier 3000… Please enter your name: {George Walker Bush}
Computing…
Name modified to: Bush, G. W.

Explanation / Answer

#include #include #include void main() { char name[100]; int i=1,j=0,p=0,l=0,k; clrscr(); printf(" Enter a name: "); gets(name); printf(" Initials:"); printf(" %c.",name[0]); l=strlen(name); for(i=1;i
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote