Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Main {
- public static void main(String[] args) {
- Scanner input = new Scanner(System.in);
- int n = Integer.parseInt(input.nextLine());
- int m = (int) (n * 1.5);
- for (int i = 0; i < m; i++) {
- int x = i;
- while (x < n + i) {
- if (x % 3 == 0) {
- System.out.print("#");
- } else {
- System.out.print(".");
- }
- x++;
- }
- System.out.println();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement