以下程序的运行结果是 int a = 3, b = 4, c = 5, t = 99; i
以下程序的运行结果是 int a = 3, b = 4, c = 5, t = 99; i
日期:2022-04-08 13:01:35 人气:1
程序的运行结果是
4599
条件b < a && a < c不满足,
程序跳 过语句 t = a;
执行a = c; c = t; (a=5, c=99)
第二次判断,条件a < c && b < c满足,
依次执行 t = b; b = a; a = t; (t=4,b=5,a=4)
所以最后的输出是:
45
4599
条件b < a && a < c不满足,
程序跳 过语句 t = a;
执行a = c; c = t; (a=5, c=99)
第二次判断,条件a < c && b < c满足,
依次执行 t = b; b = a; a = t; (t=4,b=5,a=4)
所以最后的输出是:
45