Question: Please write in C language and have the output look like this please and thank you! Write a program that will prompt the user to

 Please write in C language and have the output look like

Please write in C language and have the output look like this please and thank you!

Write a program that will prompt the user to enter a positive integer. You need to validate this value. If the value is negative, ask to re-enter an integer until the input is valid. Your program should then call a function that you write called loop_down_to_zero that takes one argument of type integer and will use a while loop to print all of the integers from the number entered down to and including the number zero with each number appearing on one line. Next, you should print one line containing four asterisks and a new line. Finally, your program should call another function that you write called loop_up_to_int that takes one argument of type integer and will use a while loop to print all of the integers from zero up to and including the number entered from the keyboard. A sample run of the program is given in the screenshot below: Please enter a positive integer: 3 Please enter a positive integer: 25 Please enter a positive integer: 1 Please enter a positive integer: 7 7 6 5 4 3 2 1 0 0 1 2 3 4 5 6 7

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!