//c how to program 习题2.19
#include <stdio.h>
int main(void)
{
int x, y, z;
printf("请输入三个不同的整数:");
scanf("%d%d%d", &x, &y, &z);
printf("Sum is %d\n", x+y+z);
printf("Average is %d\n", (x+y+z)/3);
printf("Produce is %d\n", x*y*z);
int smallest, largest;
if(x > y){
largest = x;
smallest = y;
}
if(x < y){
largest = y;
smallest = x;
}
if(z > largest){
largest = z;
}
if(z < smallest){
smallest = z;
}
printf("Smallest is %d\n", smallest);
printf("largest is %d\n", largest);
}