求两个数中的较大数
#include <stdio.h>
int max(int a,int b);
int main(){int a,b,c;printf("請輸入兩個整數:\n");scanf("%d%d",&a,&b);c=max(a,b);printf("兩個數的較大數為:%d\n",c);return 0;
}
int max(int a,int b){int t;t=(a>b)?a:b;return t;
}
總結
- 上一篇: nohup xxx 后台进程关闭,可以这
- 下一篇: js中toFixed方法的两个坑