Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- class OnesAndZeros
- {
- static void Main()
- {
- int N = int.Parse(Console.ReadLine());
- string[,] digitDrawer = new string[5, 2] {{"###", ".#."},
- {"#.#", "##."},
- {"#.#", ".#."},
- {"#.#", ".#."},
- {"###", "###"} };
- for (int row = 0; row < 5; row++)
- {
- for (int j = 15; j >= 0; j--)
- {
- int bit = (N >> j) & 1;
- Console.Write("{0}", digitDrawer[row, bit]);
- if (j != 0) Console.Write('.');
- }
- Console.WriteLine();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement