发布网友 发布时间:2024-12-17 07:25
共1个回答
热心网友 时间:9分钟前
#include<reg51.h>
int max(int x,int y)
{return (x>y?x:y);}
main(vold)
{
int num1,num2;//变量定义在开头
SCON =0*50;
TMOD|=0*20;
TH1 =0xfd;
TL1 =0Xfd;
TR1 =1;
TI =1;
printf("Input the first integer number:");
scanf("%d",&num1);
printf("Input the second integer number:");
scanf("%d",&num2);//%d不是%D
printf("max=%d\n",max(num1,num2));
while(1);
}