Advertisement
rado8506

03. Slot Machine - Ascii table

Mar 19th, 2018
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.32 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace marchExams
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             char n = char.Parse(Console.ReadLine());
  14.             int n1 = int.Parse(Console.ReadLine());
  15.             char m = char.Parse(Console.ReadLine());
  16.             int m1 = int.Parse(Console.ReadLine());
  17.             char k = char.Parse(Console.ReadLine());
  18.             int k1 = int.Parse(Console.ReadLine());
  19.             int ns = n + n1;
  20.             int ms = m + m1;
  21.             int ks = k + k1;
  22.             char symbol1 = (char)ns;
  23.             char symbol2 = (char)ms;
  24.             char symbol3 = (char)ks;
  25.             if (symbol1 == '7' && symbol2 == '7' && symbol3 == '7')
  26.             {
  27.                 Console.WriteLine($"{symbol1}{symbol2}{symbol3}");
  28.                 Console.WriteLine("*** JACKPOT ***");
  29.             }
  30.             else if (symbol1 == '@' && symbol2 == '@' && symbol3 == '@')
  31.             {
  32.                 Console.WriteLine($"{symbol1}{symbol2}{symbol3}");
  33.                 Console.WriteLine("!!! YOU LOSE EVERYTHING !!!");
  34.             }
  35.             else
  36.             {
  37.                 Console.WriteLine($"{symbol1}{symbol2}{symbol3}");
  38.             }    
  39.         }
  40.     }
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement