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
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
Math,
6 months ago
Social Sciences,
6 months ago
Computer Science,
1 year ago
World Languages,
1 year ago
Political Science,
1 year ago