Optimize solution of pattern program 1 on May 02, 2015 Get link Facebook X Pinterest Email Other Apps import java.io.* public class loop { public static void main(String args[]) { String ss = ""; Console con = System.console(); int num = Integer.parseInt(con.readLine()); for(int i = 0;i<num;i ++) { ss+="* "; System.out.println(ss); } } } Comments
Comments
Post a Comment