|
Number Cruncher V1
DOWNLOAD PROGRAM
VIEW SOLUTION
Write a program that asks the user for two integer (int) numbers (use 2 variables). After accepting them, print to the screen those numbers added, subtracted, divided and multiplied (using printf).Upon completing that task, use those same variables and ask for another set of numbers, and do the same thing. In both cases, put the manipulations in the printf statement itself.
Number Cruncher V2
VIEW SOLUTION
Write a program that asks the user for two integer (int) numbers. After accepting them, print to the screen those numbers added, subtracted, divided and multiplied (using printf).The twist is to use 3 variables, not 2. Use the first two variables in your scanf statements to accept the user input. Use the thrid to store the value after manipulation of the first 2. You will have to make use of the = (assignment) operator. When printing the results, use the thrid variable. Do not put the manipulations within the printf statement. Do so before. (Hint: For each printf statement, there will be a statement before it involving the 3 variables and the = operator)