Question: ## IN C LANGUAGE ## Create a program that accepts and formats a paragraph from the user as follows: Ask the user for the length

## IN C LANGUAGE ##

Create a program that accepts and formats a paragraph from the user as follows:

Ask the user for the length of the paragraph in characters. Repeatedly ask the user for the number of characters and only except a number more than 80 and less than 500.

Create three character arrays:

Create an array named temp of a size that fits the paragraph.

Create an array name with length 50.

Create an array pa with length 600.

Create a function called menu with the following options:

C to clear all character arrays by calling a function named wipe on each of the three arrays.

N to enter the name of the author, first and last names separated by a space, and store it in name.

F to call function heading. this function will change the first letter in each, first and last name, to upper case and create the following string in pa if user input first name is sam and last name is russel:

Paragraph by Einstein.

P to enter a new paragraph into the temp array. The paragraph should be entered in one scanf statement using %[^ ] instead of %s as a format string or a gets statement.

R to format the string in temp so that the first letter of the paragraph and each sentence is upper case, and each sentence is on one line.

V to combine the contents of name and temp in pa in order to produce the desired output(see example output below).

S to display the contents of pa by calling the following function on each of the two arrays.

void paragraph( char *cat) { printf("%s ", cat); }

X to exit the program.

Note 1: All menu options should work for upper and lower case input.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!