#include<stdio.h> #include<stdlib.h> void main() { int a,b,c; int max; scanf("%d, %d, %d", &a, &b, &c); max = (a>b) ? a : b; max = (max>c) ? max : c; printf("max num is:%d\n", max); return; }本回答被提问者采纳
试写一个算法,自大至小依次输出顺序读入的三个整数X,Y和Z的值 void main(){ int x,y,z,a,b,c;cout<<"请输入3个整数:"<<endl;cin>>x>>y>>z;a=max(x,y,z);b=min(max(x,y),max(x,z),max(y,z));c=min(x,y,z);cout<<"从小到大依次为"<<c<<" "<<b<<" "<<a<<endl;} ...