简单的For循环练习1(在控制输出数据1-10)

/*
需求:请在控制台输出数据1-10
*/

class ForDemo2{
	public static void main(String[] args){
		for(int x= 1;x<=10;x++){
			System.out.println(x);
			System.out.println("--------------");
		for(int x= 0;x<10;x++){
			System.out.println(x+1);
		}
		}
	}
}

猜你喜欢

转载自blog.csdn.net/weixin_42322406/article/details/89479086
今日推荐