用java程序编写的,求大神发个代码
3 个解决方案
#1
public static void main(String[] args) {
int i=2;
for(int j=0;j<99;i++,j+=3){
System.out.print(i+" "+i*i+" "+i*i*i+" ");
}
System.out.print(i);
}
int i=2;
for(int j=0;j<99;i++,j+=3){
System.out.print(i+" "+i*i+" "+i*i*i+" ");
}
System.out.print(i);
}
#2
谢谢啊,果然可以
#3
int i=2;
for(int j=1;j<=100;j++)
{
//2 4 8 3 9 27 4 16 64 … 输出100个.
System.out.println( j+ "-> " + i + " " +i*i + " "+i*i*i);
i++;
}
for(int j=1;j<=100;j++)
{
//2 4 8 3 9 27 4 16 64 … 输出100个.
System.out.println( j+ "-> " + i + " " +i*i + " "+i*i*i);
i++;
}
#1
public static void main(String[] args) {
int i=2;
for(int j=0;j<99;i++,j+=3){
System.out.print(i+" "+i*i+" "+i*i*i+" ");
}
System.out.print(i);
}
int i=2;
for(int j=0;j<99;i++,j+=3){
System.out.print(i+" "+i*i+" "+i*i*i+" ");
}
System.out.print(i);
}
#2
谢谢啊,果然可以
#3
int i=2;
for(int j=1;j<=100;j++)
{
//2 4 8 3 9 27 4 16 64 … 输出100个.
System.out.println( j+ "-> " + i + " " +i*i + " "+i*i*i);
i++;
}
for(int j=1;j<=100;j++)
{
//2 4 8 3 9 27 4 16 64 … 输出100个.
System.out.println( j+ "-> " + i + " " +i*i + " "+i*i*i);
i++;
}