1个回答
展开全部
package zhidao;
import java.util.Scanner;
public class words {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int num = sc.nextInt();
for(int i = 1; i < num; i++) {
for(int j = 1; j <= i; j++) {
System.out.print(j);
}
System.out.println();
}
}
}
import java.util.Scanner;
public class words {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int num = sc.nextInt();
for(int i = 1; i < num; i++) {
for(int j = 1; j <= i; j++) {
System.out.print(j);
}
System.out.println();
}
}
}
追问
谢谢你~
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询