program that print three number, their sum and average using input statment
Share
program that print three number, their sum and average using input statment
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
program to calculate sum and average of three numbers:
#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;
float avg = sum / 3.0;
printf("Sum = %d, Average = %f", sum, avg);
microsoft word or microsoft logo