Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribedimage text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

What is electric dipole explain with example

Answered: 1 week ago

Question

What is polarization? Describe it with examples.

Answered: 1 week ago

Question

6. Explain how to train managers to coach employees.

Answered: 1 week ago

Question

5. Tell how job experiences can be used for skill development.

Answered: 1 week ago