int num: double grade, total num =0 total =0 scanf(“%P’& grade);/输入第1个数* Whle( grade>=0)/约定如果是负数,结束* total total t grade numa scanf(“%y,& grade) xgliu@cadzu.edu.cn13858115132int num; double grade, total; num = 0; total = 0; scanf(“%lf”, &grade); /* 输入第1个数*/ while (grade>= 0) /* 约定如果是负数,结束 */ { total = total + grade; num++; scanf (“%lf”, &grade); } xgliu@cad.zju.edu.cn 13858115132 10