Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 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
Step: 1
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 ...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started