有如下代码:请写出程序的输出结果(  ) 1...
发布于 2022-03-03 16:45:15
有如下代码:请写出程序的输出结果( )
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | public class Test { public static void main(String[] args) { int x = 0 int y = 0 int k = 0 for (int z = 0 z < 5 z++) { if ((++x > 2) && (++y > 2) && (k++ > 2)) { x++ ++y k++ } } System.out.println(x + ”” +y + ”” +k) } } |
登录后免费查看答案
关注者
0
被浏览
71