比较a与b的大小#include<stdio.h>int main(){\x05int a,b,max;\x05printf("请输入2个整数:");\x05scanf("%d,%d",&a,&b);\x05if(a>b)\x05{\x05\x05a=max;\x05\x05\x05}\x05else\x05{\x05\x05b=max;\x05}\x05\x05printf
来源:学生作业帮助网 编辑:作业帮 时间:2024/08/31 20:45:14
![比较a与b的大小#include<stdio.h>int main(){\x05int a,b,max;\x05printf("请输入2个整数:");\x05scanf("%d,%d",&a,&b);\x05if(a>b)\x05{\x05\x05a=max;\x05\x05\x05}\x05else\x05{\x05\x05b=max;\x05}\x05\x05printf](/uploads/image/z/9481645-37-5.jpg?t=%E6%AF%94%E8%BE%83a%E4%B8%8Eb%E7%9A%84%E5%A4%A7%E5%B0%8F%23include%26lt%3Bstdio.h%26gt%3Bint+main%28%29%7B%5Cx05int+a%2Cb%2Cmax%3B%5Cx05printf%28%26quot%3B%E8%AF%B7%E8%BE%93%E5%85%A52%E4%B8%AA%E6%95%B4%E6%95%B0%3A%26quot%3B%29%3B%5Cx05scanf%28%26quot%3B%25d%2C%25d%26quot%3B%2C%26amp%3Ba%2C%26amp%3Bb%29%3B%5Cx05if%28a%26gt%3Bb%29%5Cx05%7B%5Cx05%5Cx05a%3Dmax%3B%5Cx05%5Cx05%5Cx05%7D%5Cx05else%5Cx05%7B%5Cx05%5Cx05b%3Dmax%3B%5Cx05%7D%5Cx05%5Cx05printf)
xT]OPX0[ iڳ6F9ZݺBK$TD∨p1zÈ>=];g k/ymŪѣOm57=2LX$j(CgbN
szfyn rk%%Ѧ-GNmߴ?,3f!ё¦"WCAy4Ha`j\8^+6lu%~+*BZA
wpDrKI7/I=MJTcLc&TH&cn%s20t:g,#QѬqvux>2y*m/8֬ nXzi<Yq)
[=" lnVՒLrD% XӰ\.jR9eXj^yRX%U9j` !g>T1RP-"+4䁤ʒX˚HE
/7;ovvnk=o톣;^g]lK[̋GW3iopLmr'j^6++vfQ}oͲM|[+U ym4hR`2OSM"EXX79z]b=l?յB
比较a与b的大小#include<stdio.h>int main(){\x05int a,b,max;\x05printf("请输入2个整数:");\x05scanf("%d,%d",&a,&b);\x05if(a>b)\x05{\x05\x05a=max;\x05\x05\x05}\x05else\x05{\x05\x05b=max;\x05}\x05\x05printf
比较a与b的大小
#include<stdio.h>
int main()
{
\x05int a,b,max;
\x05printf("请输入2个整数:");
\x05scanf("%d,%d",&a,&b);
\x05if(a>b)
\x05{
\x05\x05a=max;
\x05\x05
\x05}
\x05else
\x05{
\x05\x05b=max;
\x05}
\x05
\x05printf("max=%d,a的值大\n",max);
}结果出来这操蛋玩意儿,新手伤不起啊. 我的意思是a和b谁大 就把他的值赋给max 结果出来个这个,求大神告我怎么写.
比较a与b的大小#include<stdio.h>int main(){\x05int a,b,max;\x05printf("请输入2个整数:");\x05scanf("%d,%d",&a,&b);\x05if(a>b)\x05{\x05\x05a=max;\x05\x05\x05}\x05else\x05{\x05\x05b=max;\x05}\x05\x05printf
if(a>b)
{
max=a;
}
else
{
max=b;//赋值方法反了
}