图形显示

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/skyejy/article/details/87925977

如果考试的时候也有这么简单的题就好了。

import java.util.Scanner;

public class drawdot {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
         Scanner sc=new Scanner(System.in);
         int n=sc.nextInt();
         
        while(n>=1)
         {
        	 for(int m=1;m<=n;m++)
        	 { System.out.print("*"+" ");
        	 }
        	 System.out.println();
             n--;
         }
	}

}

猜你喜欢

转载自blog.csdn.net/skyejy/article/details/87925977
今日推荐