Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- class LocalElections
- {
- static void Main()
- {
- // input
- int totalCandidates = int.Parse(Console.ReadLine()); // 10; // 3; // byte.Parse(Console.ReadLine());
- int vote = int.Parse(Console.ReadLine()); // 4; // 1; // byte.Parse(Console.ReadLine());
- char symbol = (char)Console.Read(); //'V'; // 'x';// (char)Console.Read();
- // output
- // Console.WriteLine(new string('.', 13));
- for (int i = 1; i <= totalCandidates; i++)
- {
- Console.WriteLine(".............");
- Console.WriteLine("...+-----+...");
- if (i == vote && (symbol == 'X' || symbol == 'x'))
- {
- Console.WriteLine("...|.\\./.|...");
- Console.WriteLine("{0:00}.|..X..|...", i);
- Console.WriteLine("...|./.\\.|...");
- }
- else if (i == vote && (symbol == 'V' || symbol == 'v'))
- {
- Console.WriteLine("...|\\.../|...");
- Console.WriteLine("{0:00}.|.\\./.|...", i);
- Console.WriteLine("...|..V..|...");
- }
- else {
- Console.WriteLine("...|.....|...");
- Console.WriteLine("{0:00}.|.....|...", i);
- Console.WriteLine("...|.....|...");
- }
- Console.WriteLine("...+-----+...");
- }
- Console.WriteLine(".............");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment