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 Leson01
- {
- class Program
- {
- static void Main(string[] args)
- {
- Console.WriteLine("Сколько у золота ?");
- int bagOfCoins = Convert.ToInt32(Console.ReadLine());
- Console.WriteLine("Цена кристалла - 2:1 .Сколько вам нужно купить кристаллов ?");
- int buyingСrystals = Convert.ToInt32(Console.ReadLine());
- int restOfGold = bagOfCoins - (buyingСrystals * 2);
- int numberOfCrystals = bagOfCoins / buyingСrystals;
- Console.WriteLine("Остаток золота" + " " + restOfGold);
- Console.WriteLine("Количество кристаллов" + " " + numberOfCrystals);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement