Untitled

mail@pastecode.io avatar
unknown
java
2 months ago
354 B
2
Indexable
Never
public class Pattern {
	public static void main (String [] args) {
 
		int n = 5;
		for (int i = 0; i < n; i++) {
			for (int j = 0; j < n; j++) {
			if (i == j || i == 0 || i + j == n - 1 || j == 2 )//vargu kryesor
	    System.out.print(j + i + " ");
			//vargu kryesor
         else 
				System.out.print("  ");
			}
			System.out.println();
		}
 
	}
}