int main (int argc,char **argv)
{
int max = 0;
int a = 0;
int b = 0;
int c = 0;
scanf("%d",&a);
scanf("%d",&b);
scanf("%d",&c);
max = c;
if (a > max){
max = a;
}else if(b > max){
max = b;
}else{
max = c;
}
printf("%d",max);
return 0;
{
int max = 0;
int a = 0;
int b = 0;
int c = 0;
scanf("%d",&a);
scanf("%d",&b);
scanf("%d",&c);
max = c;
if (a > max){
max = a;
}else if(b > max){
max = b;
}else{
max = c;
}
printf("%d",max);
return 0;
}
//程序简单,但有个思想比较好,就是先假设定义一个最大值,如果以后的元素比大还大,交换,,直至找到最大值
这个思想在直接选择排序算法中有体现,,后续