Question: Make a program in C that asks the user for a number ( this will be the number of lines ) then ask the user

Make a program in C that asks the user for a number
(this will be the number of lines)
then ask the user to type in their text
(this text will be the number of lines that the user typed. Then the program will print *'s around
the text entered in from earlier with spacing depending on the user's entered text.
For example if the user inputs:
Enter Number of Lines: 4
Enter Text:
The antique clock chimed softly, echoing through the dusty attic.
Moonlight shimmered on the waves, painting silvery streaks on the water.
Wind whispered secrets through the ancient oaks, leaves rustling in reply.
A single ember glowed, defiant against the encroaching darkness.
Then the program will output:
The antique clock chimed softly, echoing through the dusty attic
Moonlight shimmered on the waves, painting silvery streaks on the water.
Wind whispered secrets through the ancient oaks, leaves rustling in reply.
A single ember glowed, defiant against the encroaching darkness.Also if the user inputs:
Enter Number of Lines: 0
The program will skip asking the user for lines and have an output of:
********
********
Lastly if the user inputs an empty line of text like this:
Enter Number of Lines: 3
Enter Text:
How many times can a lime really rhyme.
Time will make you into slime.
Then the program will output:
************************************************************************
How many times can a lime really rhyme. *
Time will make you into slime
************************************************************************
 Make a program in C that asks the user for a

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!