Question: C++ using Xcode on mac Number one needs to be done 3 times using do...while loop, while-loop, and for-loop. For each exercise, include the program

C++ using Xcode on mac
Number one needs to be done 3 times using do...while loop, while-loop, and for-loop.
For each exercise, include the program along with comments, and a screenshot of the console. 5-1: Counting with Loops Write a program that inputs a number greater than or equal to 0. The program should then count from 0 to the number inputted using a for-loop, a while-loop, and a do...while loop. If the user's input is not greater than or equal to 0, display an error message and require the user to try again until they get it right. 5-2: Factorial Let n be a nonnegative integer. The factorial of n, written n! is defined by 0!-1, n! - 1-2.3... nifn2 1. For example, 4!-1-2.3.4-24. Write a program that prompts the user to enter a nonnegative integer and outputs the factorial of the number, then find the approximate value of the number e using the read input as n in the approximating equation belovw 2!3! (e is an irrational number-2.718281827.. used in exponential growth and decay problems) Run the output for at least n-20, n-50
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
