Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- class StrippedTowel
- {
- static void Main()
- {
- int n = int.Parse(Console.ReadLine());
- int width = n;
- int height = n + n / 2;
- for (int i = 0; i < height; i++)
- {
- for (int j = 0; j < width; j++)
- {
- bool isStripe = (j + i) % 3 == 0;
- if (isStripe)
- {
- Console.Write("#");
- }
- else
- {
- Console.Write(".");
- }
- }
- Console.WriteLine();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement