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 tasks
- {
- class Program
- {
- static void Main(string[] args)
- {
- int goldCount;
- int cristallCount;
- int cristallPrice = 6;
- Console.WriteLine("Сколько у вас золота?");
- goldCount = Convert.ToInt32(Console.ReadLine());
- Console.WriteLine("Сколько кристаллов по 6 золота вы хотите купить?");
- cristallCount = Convert.ToInt32(Console.ReadLine());
- goldCount = goldCount % (cristallCount * cristallPrice);
- Console.WriteLine($"Теперь у вас в кармане {goldCount} золота и {cristallCount} кристаллов.");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement