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 Homework6
- {
- internal class Program
- {
- static void Main(string[] args)
- {
- float money;
- float countCrystals;
- float priceForCrystal = 10;
- Console.Write("В нашем магазине выможете купить кристаллы, сколько у вас золота? ");
- money = Convert.ToSingle(Console.ReadLine());
- Console.Write($"Отлично! Какое количество вы хотите купить? Цена за один - {priceForCrystal} золота! ");
- countCrystals = Convert.ToSingle(Console.ReadLine());
- money -= priceForCrystal*countCrystals;
- Console.WriteLine($"У Вас {countCrystals} кристаллов и осталось {money} золота!!!");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement