public class test{

public class test{
\x05public static void main(String args[] ){
\x05int x=0;
\x05\x05int y=0;
\x05while (x4){
y=y-1;}
System.out.print(x + ""+y+" ");
x=x+1;
\x05}
\x05}
\x05
}
02 14 25 36 47
其他人气:854 ℃时间:2020-04-15 04:26:33
优质解答
这是JAVA代码.public class test{\x05public static void main(String args[] ){\x05int x=0;\x05int y=0;\x05while (x4) { //若果y大于4,就y减少1.y=y-1;}System.out.print(x + ""+y+" "); //输出x和y的值,一起输出...假设上面的条件中有X 那是不是第一次输出完了的x的值也要在x=x+1加上1?System.out.print(x + ""+y+" ");x=x+1;两个语句是相邻的,没有什么跳转,所以每次输出xy后,下一步就是 x = x+1 进行x自增。但不是 x = x+1 再加1.x = x + 1 而已。
我来回答
类似推荐
请使用1024x768 IE6.0或更高版本浏览器浏览本站点,以保证最佳阅读效果。本页提供作业小助手,一起搜作业以及作业好帮手最新版!
版权所有 CopyRight © 2012-2024 作业小助手 All Rights Reserved. 手机版