Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- class StripedTowel
- {
- static void Main()
- {
- int width = int.Parse(Console.ReadLine());
- int height = (int)(width * 1.5);
- string pattern = "#..";
- for (int i = 0; i < height; i++)
- {
- for (int j = i % 3; j < width + i % 3; j++)
- {
- int index = j % 3;
- Console.Write(pattern[index]);
- }
- Console.WriteLine();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement