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 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 Yis 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:-/CS1050/FS2019/Labs/Lab2$ compile prelab2.c JimR@JimRArea51:-/CS1050/FS2019/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 ** X = 15 Y = 7 Example 2 JimR@JimRArea51:-/C51050/FS2019/Labs/Lab2$ compile prelab2.c JimR@J imRArea51:-/CS1050/FS2019/Labs/Lab2$ ./a.out Enter 2 integers separated by spaces: 1 2 *** Initial values *** X = 1 Y = 2 *** Calculated values *** X times Y = 2 x divided by Y = X plus 1, quantity times Y = 4 *** Final values *** X = 1 Y - 2

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

i have the same problem please help

Answered: 1 week ago

Question

Differentiate the function. r(z) = 2-8 - 21/2 r'(z) =

Answered: 1 week ago