Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write a complete program that calculates and prints the product and sum of three

ID: 638944 • Letter: W

Question

Write a complete program that calculates and prints the product and sum of three integers.

The program should do the following:

Accept 3 integers from the command line from the user.

The input should accept one integer at a time, so an example run of the program should look like:

Enter first integer: 10

Enter second integer: 20

Enter third integer: 30

3. Compute the product and sum of the three integers.

4. Print those outputs back to the command line in the following format:

Integer One is: a

Integer Two is: b

Integer three is: c

The product is: d

The sum is: e

5. a, b and c are the numbers input into the command line. d, and e are the results of the mathematical operation on the input numbers.

Explanation / Answer

it's simple:

{
int a,b,c,d,e;
printf("enter the numbers");
scanf("%d" &a );

printf("enter the numbers");
scanf("%d"&b);

printf("enter the number c");
scanf("%d", &c);

d=a+b+c;
printf("the sum is=%d" ,d);


e=a*b*c;
printf("The Product is=%d",e);
}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote