Question: Write a program that: Declare two variables; initialize the second variable to be 1 0 0 0 Gets a value of the first variable from

Write a program that:
Declare two variables; initialize the second variable to
be 1000
Gets a value of the first variable from the user
If the first variable is 0, the program increments the
first variable
If the first variable is 1, the program decrements the
first variable and increments the second variable
If they first variable is -100, the program increments
the first variable and decrements the second variable
In all other cases, the program sets both variables to 0
Print the final result on screen
Write a program that: Declare two variables;

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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!