Advertisement
TargeTPoweR

Untitled

Mar 17th, 2020
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace tasks
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. int goldCount;
  14. int crisCount;
  15. int crisPrice = 6;
  16. Console.WriteLine("Сколько у вас золота?");
  17. goldCount = Convert.ToInt32(Console.ReadLine());
  18. Console.WriteLine("Сколько кристаллов по 6 золота вы хотите купить?");
  19. crisCount = Convert.ToInt32(Console.ReadLine());
  20. int goldRemain = goldCount % (crisCount * crisPrice);
  21. Console.WriteLine($"Теперь у вас в кармане {goldRemain} золота и {crisCount} кристаллов.");
  22.  
  23. }
  24. }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement