编写一个C程序,运行时输人abc三个值,输出其中值最大者。
#include <stdio.h>
void main(){
int a,b,c,max;
printf("请输入三个数:");
scanf("%d %d %d",&a,&b,&c);
max=a;
if(max<b){
max=b;
}
if(max<c){
max=c;
}
printf("%d",max);
}
不懂请留言,谢谢!
更多推荐
C语言学习之编写一个C程序,运行时输人abc三个值,输出其中值最大者。
发布评论