int b=5;
for(int a=1;a<=49;a++){
b=b+5;
System.out.println(a+"-----"+b);}
怎么打印b的当前位置的和啊
就是在10后面有10,15后面有25,20后面有45
菜鸟级精英
学分:0 LV1
TA的每日心情
2020-03-23 21:05:48
int b = 5;
int c = 0;
for (int a = 1; a <= 49; a++) {
b = b + 5;
System.out.println(a + "-----" + b + "-----" + (b + c));
c = b;
}