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 crisCount;
- int crisPrice = 6;
- Console.WriteLine("Сколько у вас золота?");
- goldCount = Convert.ToInt32(Console.ReadLine());
- Console.WriteLine("Сколько кристаллов по 6 золота вы хотите купить?");
- crisCount = Convert.ToInt32(Console.ReadLine());
- int goldRemain = goldCount % (crisCount * crisPrice);
- Console.WriteLine($"Теперь у вас в кармане {goldRemain} золота и {crisCount} кристаллов.");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement