// 求两个整数中的较大者 #include <stdio.h> int max( int a, int b ) { int temp; if( a > b ) { temp = a; } else { temp = b; } return temp; } int main() { int a,b; printf("请输入要比较的两个数:\n"); scanf("%d %d",&a,&b); printf("大数是:%d\n",max(a,b)); return 0; } <img src="http://img.blog.csdn.net/20150423113457620?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvemhhb3lhcWlhbjU1Mg==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center" alt="" />
时间: 2024-11-07 22:50:04