Question: Write a program that takes a single integer input from the user and stores it in a variable. Your program should increase the value

Write a program that takes a single integer input from the user 

Write a program that takes a single integer input from the user and stores it in a variable. Your program should increase the value of this variable by one four times, printing "number is now " followed by its value each time, then decrease it by one four times, again printing "number is now " and the value each time. You must use unary operators to increase/decrease the value of the variable to receive full credit for this assignment. Sample Run Enter starting number (must be an integer) >24 number is now 25 number is now 26 number is now 27 number is now 28 number is now 27 number is now 26 number is now 25 number is now 24

Step by Step Solution

3.38 Rating (151 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

The program then increases the value of this variable by one four timesprinting number is now followed by its value each timethen decreases it by one ... View full answer

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 Programming Questions!