Advertisement
Sim0o0na

3. Slot Machine

Mar 12th, 2018
655
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.24 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 SlotMachine
  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.  
  20.             int x1 = (int)n + n1;
  21.             int x2 = (int)m + m1;
  22.             int x3 = (int)k + k1;
  23.  
  24.  
  25.             char f = (char)x1;
  26.             char s = (char)x2;
  27.             char t = (char)x3;
  28.  
  29.             if (f == '@' && s == '@' && t == '@')
  30.             {
  31.                 Console.WriteLine($"{f}{s}{t}");
  32.                 Console.WriteLine($"!!! YOU LOSE EVERYTHING !!!");
  33.             }
  34.             else if (f == '7' && s == '7' && t == '7')
  35.             {
  36.                 Console.WriteLine($"{f}{s}{t}");
  37.                 Console.WriteLine($"*** JACKPOT ***");
  38.             }
  39.             else
  40.             {
  41.                 Console.WriteLine($"{f}{s}{t}");
  42.             }
  43.  
  44.         }
  45.     }
  46. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement