Computer Science, asked by TbiaSamishta, 1 year ago

Use the printf("\n sum = %d,\nagerage = %d\n", a+b+c, (a+b+c)/3) to print sum and average of three numbers?

Answers

Answered by Secondman
0

"According to the question, using the given code three numbers should be summed up and their average must be determined. Such that the program would be as,

Img 42_11

The above program declares three variables a, b, and c. Then, it prints a message to the user for instructing him to enter three values. The scanf statement then inputs those values to the respective three variables. After that, the printf statement prints the sum and average of the numbers after calculating it dynamically."

Attachments:
Similar questions