Question: Write a program that prompts the user to enter a number. If the number entered is a positive number, the program should display that the
Write a program that prompts the user to enter a number. If the number entered is a positive number, the program should display that the number is positive as well as the number itself. If the number entered is a negative number, the program should display that the number is negative as well as the number itself. If the number entered is zero, the program should display that the number entered was zero as well as the number itself. If an invalid value is entered, then an error message should be displayed as well as the invalid value. The program should perform this process in a While loop which inputs a number, determines what should be displayed, displays the output, and repeats itself until the value of is entered, which would end the program.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
