public class Test{
public static void main(String[] args){
//输出12345
for(int a=1;a<=5;a++){
system.out.print(a);
}
//输出1到10之内的奇数
for(int a=1;a<=10;a++){
if(a/2!=0){
system.out.print(a);
}
}
}
}
我尽力了,望采纳
public class TestBaiduKnow {
public static void main(String[] args) {
for(int i = 1;i<=5;i++)
System.out.print(i+"\t");
System.out.println();
for(int i =1;i<=10;i+=2)
System.out.print(i+"\t");
}
}
代码已上传,下载试试吧
public class Test {
public static void main(String[] args) {
for(int i = 1;i<=5;i++)
System.out.prinln(i+"\t"+(2*i-1));
}
}