Write a program in basic to calculate the average of three numbers
Answers
Answered by
2
Explanation:
C 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);
Similar questions