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 homework
- {
- class Program
- {
- static void Main(string[] args)
- {
- Console.Write("Введите количество вашего золота: ");
- int gold = Convert.ToInt32(Console.ReadLine());
- int crystal = 0;
- const int costCrystal = 10;
- Console.WriteLine("\n- Сколько вы хотите купить у меня кристаллов по цене "+costCrystal+" золотых за единицу?");
- int numberCrystal = Convert.ToInt32(Console.ReadLine());
- gold -= costCrystal * numberCrystal;
- crystal += numberCrystal;
- Console.WriteLine("\nВаше золото: "+ gold+"\nВаши кристаллы: "+ crystal);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement