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 Курсы
- {
- class Program
- {
- static void Main(string[] args)
- {
- Console.WriteLine("Продавец: Добро пожаловать в магазин кристалов! Один стоит 15 монет.");
- int crystalPrice = 15;
- Console.WriteLine("Введите колличество ваших денег:");
- int money = Convert.ToInt32(Console.ReadLine());
- int maxCrystalBye = money / crystalPrice;
- int remainingMoney = money % 15;
- Console.WriteLine($"Герой:Я хочу купить столько, сколько смогу, то есть {maxCrystalBye} кристала," +
- $" а на оставшиеся {remainingMoney } монет я куплю пивка!!!") ;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement