main() { float a,b,c,p,max,i; //把平均定为p,最高定为max for (i=1;i<=10;i++) {scanf("%f,%f,%f",&a,&b,&c); p=(a+b+c)/3; printf("the average is %f\n",p); if(a>=b&&a>=c),max=a; if(b>=a&&b>=c),max=b; if(c>=a&&c>=b),max=c; } printf("the max is %f\n",max); }
ヽ冷艳°皇后
2025-03-02 03:12:29
#include <stdio.h> void main() { printf("welcome to this program!\n"); printf("please the first student's score"); printf("please the first student's score"); printf("please the first student's score"); printf("please the first student's score"); printf("please the first student's score");