Question: If we have an integer variable a , we can set a to the product of 5 and 1 0 : a = 5 *

If we have an integer variable a, we can set a to the product of 5 and 10:
a =5*10;
We can also set a variable c to the addition of two other variables a and b:
c = a + b;
Write a program that:
defines three integer variables a, b and c
reads values for a and b
assigns the sum of a and b to c
prints c
assigns the difference from a and b to c
prints c
assigns the multiplication from a and b to c
prints c
assigns the division from a by b to c
prints c
Compile and run the program above and notice the output results
Write your input/output and findings under the program comments
Save the program

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!