Question: CS 1 0 5 0 - Prelab 2 Spring 2 0 2 4 Concepts to Practice Simple input / output Integer variables Arithmetic operators Description

CS1050- Prelab2
Spring 2024
Concepts to Practice
Simple input/output
Integer variables
Arithmetic operators
Description
For the prelab assignment, write a C program that reads in four integer numbers from user input that will be entered on the same line and separated by a space. The first integer should be called A, the second B, the third C, and the fourth D.
Print the following:
Print the values of A,B,C, and D.
Print the value of the sum of B and C.
Print the value of the product of A and D.
Print the value of the integer quotient of A divided by C.
Print the value of the integer remainder of C divided by D.
Print the value of the quantity A times C divided by (integer division) the quantity B plus D.
Sample Output 1
Enter 4 integers (A,B,C,D) separated by spaces: 4357
*** Initial values ******
A=4
B=3
C=5
D=7
*** Calculated values ***
The sum of B and C=8
The product of A and D=28
The integer quotient of A divided by C=0
The integer remainder of C divided by D=5
The product of A and C divided by the quantity sum of B and D=2
 CS1050- Prelab2 Spring 2024 Concepts to Practice Simple input/output Integer variables

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!