belongs to collection: Java Pattern programs
public class pattern { public static void main(String[] args) { for (int i = 1; i <= 10; i++) { for (int j = 1; j <= 10; j++) { if (i==1 || i==10 || j==1 || j==10 ) System.out.print(" 1"); else System.out.print(" "); } System.out.println(); } }}
Output:
total answers (1)
start bookmarking useful questions and collections and save it into your own study-lists, login now to start creating your own collections.
Program:
Output:
need an explanation for this answer? contact us directly to get an explanation for this answer