Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Globalization;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace HW_2025
- {
- internal class Program
- {
- static void Main(string[] args)
- {
- float gold;
- float crystal;
- float convertIndexGold = 10;
- float convertIndexCrytal = 3;
- Console.WriteLine("Hi! Сколько у вас ЗОЛОТА?");
- gold = Convert.ToSingle(Console.ReadLine());
- Console.WriteLine("\nБу, купи голды!\n\n" +
- "К У Р С\n" +
- "########\n" +
- $"{convertIndexGold}g = {convertIndexCrytal}cr\n" +
- "Сколько желаешь купить кристалов?");
- crystal = Convert.ToSingle(Console.ReadLine());
- gold -= (convertIndexGold/convertIndexCrytal) * crystal;
- Console.WriteLine($"У вас на счете:\n" +
- $"Золота = {Math.Round(gold, 2)}\n" +
- $"Кристалов = {Math.Round(crystal, 2)}");
- Console.ReadKey();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement