zzulioj 1009: Find the average score

Topic description
Knowing the scores of a certain student in math, English and computer courses, find the average score of the student in three courses.

Input
Enter three integers, separated by spaces.

Output The
output occupies one line, contains a real number, is the average score of the three courses, and retains two decimal places.

Sample input Copy
87 73 93
Sample output Copy
84.33

#include<stdio.h>
int main()
{
    
    
	int a, b, c;
	double n;
	scanf("%d%d%d",&a,&b,&c);
	n=1.0*(a+b+c)/3;
	printf("%.2lf",n);
	return 0;
}

Guess you like

Origin blog.csdn.net/m0_53024529/article/details/112664882