Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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
image text in transcribed

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

Logistics Lifeline Supply Chain Strategies

Authors: Ehsan Sheroy

1st Edition

7419377502, 978-7419377503

More Books

Students also viewed these Databases questions

Question

a. Describe the encounter. What made it intercultural?

Answered: 1 week ago