Instructions: 1. Input three decimal numbers in one line separated by spaces, and make sure to store them in different variables. 2. Multiply the 1st and 2nd decimal numbers, and store the product into a variable. 3. Then, divide the product of the 1st and 2nd decimal numbers with the 3rd decimal number, then print out its quotient. Input 1. First decimal number 2. Second decimal number 3. Third decimal number Output The first three lines will contain message prompts to input the three decimal numbers. The last line contains the result in two decimal places. Enter the first number: 1.53 Enter the second number: 2.25 Enter the third number: 1.23 Result - 2.80

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

C Language / C Program 

What is the correct input to be coded for this coding (Codechum)?

main.c
1 #include<stdio.h>
2
3- int main(void){
4
int first;
int second;
int third;
7
8
printf("Enter the first number: ");
scanf("%f", &first);
printf("Enter the second number: ");
scanf("\n%f", &second);
printf("Enter the third number: ");
scanf("\n%f", &third);
10
11
12
13
14
15
16
17
18
19
20
21 return 0;
22 CI
int product = first*second;
int final = product/third;
printf("Result = %.2f", result);
Transcribed Image Text:main.c 1 #include<stdio.h> 2 3- int main(void){ 4 int first; int second; int third; 7 8 printf("Enter the first number: "); scanf("%f", &first); printf("Enter the second number: "); scanf("\n%f", &second); printf("Enter the third number: "); scanf("\n%f", &third); 10 11 12 13 14 15 16 17 18 19 20 21 return 0; 22 CI int product = first*second; int final = product/third; printf("Result = %.2f", result);
4. Decimal x Decimal
by CodeChum Admin
Now that we're done with integers, we're moving
on to decimals!
Instructions:
1. Input three decimal numbers in one line
separated by spaces, and make sure to
store them in different variables.
2. Multiply the 1st and 2nd decimal
numbers, and store the product into a
variable.
3. Then, divide the product of the 1st and
2nd decimal numbers with the 3rd
decimal number, then print out its
quotient.
Input
1. First decimal number
2. Second decimal number
3. Third decimal number
Output
The first three lines will contain message
prompts to input the three decimal numbers.
The last line contains the result in two decimal
places.
Enter the first number: 1.53
Enter the second number: 2.25
Enter the third number: 1.23
Result = 2.80
III
Transcribed Image Text:4. Decimal x Decimal by CodeChum Admin Now that we're done with integers, we're moving on to decimals! Instructions: 1. Input three decimal numbers in one line separated by spaces, and make sure to store them in different variables. 2. Multiply the 1st and 2nd decimal numbers, and store the product into a variable. 3. Then, divide the product of the 1st and 2nd decimal numbers with the 3rd decimal number, then print out its quotient. Input 1. First decimal number 2. Second decimal number 3. Third decimal number Output The first three lines will contain message prompts to input the three decimal numbers. The last line contains the result in two decimal places. Enter the first number: 1.53 Enter the second number: 2.25 Enter the third number: 1.23 Result = 2.80 III
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY