84.3k views
5 votes
write the program or pseudocode algorithm that computes the product and average of three integers and display the results​

1 Answer

1 vote

Answer:

Algorithm:

Step 1: Begin

Step 2: Obtain the inputs – all the three integers

Step 3: Calculate product using the formula “a*b*c”

Step 4: Calculate sum and then with the help of sum calculate the average

Step 5: Print the value of product and average

Step 6: End

Step-by-step explanation:

Program:

#include<stdio.h>

int main () {

int a, b, c;

printf(""Enter three numbers: "");

scanf(""%d %d %d"", &a, &b, &c);

int sum = a + b + c;

int product = a * b * c;

float avg = sum / 3.0;

printf(“Product = %d”, product”);

printf(""Sum = %d, Average = %f"", sum, avg);

return 0;

}

User RooiWillie
by
5.2k points