Pattern program 14


	import java.io.Console;
	class pattern14 {
		public static void main(String args[]) {
			int n;
			String s="";
			Console con=System.console();
			System.out.print("Enter your Number : ");
			n=Integer.parseInt(con.readLine());
			for(int i=1;i<=n;i++) {
				for(int j=n;j>i;j--) {
					System.out.print(" ");
				}
				for(int k=i;k>=1;k--) {
					System.out.print("*");
				}
				System.out.println();
			}
		}
	}

Comments