/* Kiev Goh 307138733 CS2011-1 F19 Pattern Block 1 */ import java.util.Scanner; public class PatternBlock1 { public static void main(String[] args) { Scanner input = new Scanner(System.in); System.out.println("Enter block size (>2): "); int s = input.nextInt(); if (s < 3) { System.out.println("Size must be at least 3"); System.exit(0); } for (int x = 1; x <= s; x++) { for (int y = 1; y <= x; y++) { System.out.print(". "); } for (int z = s - x; z > 0; z--) { System.out.print("o "); } System.out.println(""); } } }