# include <stdio.h>
int main()
{
int a, b;
step1:
printf("请输入a b的值:\n");
scanf ("%d%d", &a, &b);
if (a > b)
printf("%d>%d\n",a, b);
else if (a == b) //容易出错地方,等号必须为'==','='表示的是赋值;
printf("%d=%d\n",a, b);
else
printf("%d<%d\n",a, b);
goto step1;
return 0;
}
if...else if...else用法
最新推荐文章于 2023-08-02 22:27:02 发布