Question: Concepts to Practice Simple input/output Integer variables Arithmetic operators Description For the prelab assignment, write a C program that reads in two integer numbers from

 Concepts to Practice Simple input/output Integer variables Arithmetic operators Description Forthe prelab assignment, write a C program that reads in two integer

Concepts to Practice Simple input/output Integer variables Arithmetic operators Description For the prelab assignment, write a C program that reads in two integer numbers from user input. Save the values of these numbers in two variables called X and Y. Print the values of X and Y. Print the value of X multiplied times Y. Print the value of X divided by Y. Print the value of X plus 1, quantity times Y (e.g., if X is 5 and Y is 2 then X plus 1 quantity times Y is 12 because X plus 1 is 6 and 6 times 2 is 12). Print the values of X and Y again to show that they did not change. Example 1: jimr@JimRArea51:-/C51050/SP2022/labs/lab2$ compile prelab2.c jimr@JimRArea51:-/CS1050/SP2022/labs/lab2$ ./a.out Enter 2 integers separated by spaces: 7 11 *** Initial values *** X-7 Y - 11 *** Calculated values *** X times Y - 77 X divided by Y- X plus 1, quantity times Y - 88 *** Final values *** X - 7 Y - 11 Example 2 jimn@JimRArea51:-/CS1050/SP2022/labs/lab2$ ./a.out Enter 2 integers separated by spaces: 15 7 *** Initial values *** X = 15 Y = 7 *** Calculated values *** X times Y = 105 X divided by Y - 2 X plus 1, quantity times Y = 112 *** Final values *** *** Final values *** X = 15 Y = 7

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