#include<stdio.h> void main() { int x, y, z; double a,b,c,d,average; x = 1; y = 1; z = 0; average = (x + y + z) / 3; printf("第(1)类情况,输出结果为%lf\n", average); printf("第(2)类情况,请继续依次输入x,y,z的值:"); scanf("%lf%lf%lf", &a, &b, &c); d = (a + b + c) / 3; printf("average=%.2lf", d); }