Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace _03.Slot_Machine
- {
- class Program
- {
- static void Main(string[] args)
- {
- char firstSymbol = char.Parse(Console.ReadLine());
- int firstNum = int.Parse(Console.ReadLine());
- char secondSymbol = char.Parse(Console.ReadLine());
- int secondNum = int.Parse(Console.ReadLine());
- char thirdSymbol = char.Parse(Console.ReadLine());
- int thirdNum = int.Parse(Console.ReadLine());
- int firstSumAsciiValue = firstSymbol + firstNum;
- int secondSumAsciiValue = secondSymbol + secondNum;
- int thirdSumAsciiValue = thirdSymbol + thirdNum;
- char first = (char)firstSumAsciiValue;
- char second = (char)secondSumAsciiValue;
- char third = (char)thirdSumAsciiValue;
- string result = first.ToString() + second.ToString() + third.ToString();
- if (result == "@@@")
- {
- Console.WriteLine("@@@");
- Console.WriteLine($"!!! YOU LOSE EVERYTHING !!!");
- }
- else if (result == "777")
- {
- Console.WriteLine("777");
- Console.WriteLine($"*** JACKPOT ***");
- }
- else
- Console.WriteLine($"{first}{second}{third}");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement