有3個整數a, b, c,由鍵盤輸入,輸出其中最大的數。

#include<stdio.h>
#include<math.h>
int main(){
	int a,b,c,t,max;
	scanf("%d %d %d",&a,&b,&c);
	if(a>b)
	{
	t=a;
}
    else{
    t=b;
	}
	if(t>c)
	{
	max=t;
}
    else{
	max=c;
}
	printf("%d\n",max);
	return 0;
}
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章