Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace ConsoleApp13
- {
- class Program
- {
- static void Main(string[] args)
- {
- int MyGold;
- int NeededCrystals;
- int LeftGold;
- Console.WriteLine("Приветствую, путник. ");
- Console.WriteLine("Сколько у вас злотых?");
- MyGold = int.Parse(Console.ReadLine());
- Console.WriteLine("За один кристалл я хочу 10 злотых. Сколько штук месье желает купить?");
- NeededCrystals = int.Parse(Console.ReadLine());
- LeftGold = MyGold - NeededCrystals * 10;
- Console.WriteLine("Удачная сделка!");
- Console.WriteLine("Теперь у вас " + NeededCrystals + " кристаллов и " + LeftGold + " золота");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment