Advertisement
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 HomeWorck_4_2
- {
- class Program
- {
- static void Main(string[] args)
- {
- int myGold = 0;
- int myСrystal = 0;
- int amountCrystals;
- int GoldToCrystal = 2;
- Console.WriteLine("Сколько дед отставил золота вам в наследство?");
- myGold = Convert.ToInt32(Console.ReadLine());
- Console.WriteLine("Сколько вы хотите купить кристаллов за это золото?" + "\n" +
- "--- Обменный курс: 1 кристалл за 2 золота ---");
- amountCrystals = Convert.ToInt32(Console.ReadLine());
- myСrystal = amountCrystals;
- myGold -= amountCrystals * GoldToCrystal;
- Console.WriteLine("Вы получили: " + myСrystal + " кристаллов" + "\n" +
- "У вас осталось: " + myGold + " золото");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement