Question: write a program that keeps prompting the user to input an integer as long as the integer is not zero then output either positive number
Write a program that keeps prompting the user to input an integer (a loop is needed) as long as the in not zero, then output either "positive number" or "negative number" depending the nature of the nur inputted zero ends the program. Here is an example of output C:Windows system32\cmd.exe Enter an integer(input zero will stop the program); 6 6 is a positive numbmer Enter an integer(input zero will stop the program): -8 -8 is a negative numbmer Enter an integerKinput zero will stop the program: 10 10 is a positive numbmer Enter an integer(input zero will stop the program: 0 0 is enterd. the program ended Press any key to continue
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
