Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - 1. Programming (c1.c) Define three integer variables x, y, z and a real variable average, calculate and output the square of the three integers
1. Programming (c1.c) Define three integer variables x, y, z and a real variable average, calculate and output the square of the three integers

#include

#include

void main()

{ int x, y,z;

float average;

x=y=1; z=0; average=(float)(x+y+z)/3; printf("averge =%f\n",averge);

scanf("%d,%d,%d",&x,&y,&z); average=(float)(x+y+z)/ 3; printf("averge=%f\n",averge);

}