Pattern program 4 on May 04, 2015 Get link Facebook X Pinterest Email Other Apps import java.io.*; class pattern4 { public static void main(String args[]) { Console con = System.console(); int n = Integer.parseInt(con.readLine()); for(int i=1;i<=n;i++) { for(int j=1;j<=i;j++) System.out.print(j+" "); System.out.println(); } } } Comments
Comments
Post a Comment