#include<stdio.h>Int main(void)Enter grades: 67 88 73 54 82 -1 intnum;doublegrade, total;Grade average is 72.80num = 0; total = 0;Numberof failures is 1printf("Enter grades: In");scanf("%lf", &grade);/*输入第1个数*/*输入负数,循环结束*while(grade>=0)(total = total + grade;num++;if(grade<60) count++;scanf ("%lf", &grade);1if(num != 0) {printf("Grade average is %.2fin", total/num);printf("Number offailuresis%din",count);1elseprintf(" Grade average is Oln");return 0;1D#include <stdio.h> Int main(void) { int num; doublegrade, total; num = 0; total = 0; printf(“Enter grades: \n"); scanf("%lf", &grade); /* 输入第1个数*/ while (grade >= 0) { /* 输入负数,循环结束 */ total = total + grade; num++; if(grade<60) count++; scanf (“%lf”, &grade); } if(num != 0) { printf(“Grade average is %.2f\n", total/num); printf("Number of failures is %d\n", count); } else printf(" Grade average is 0\n"); return 0; } Enter grades: 67 88 73 54 82 -1 Grade average is 72.80 Number of failures is 1