Advertisement
TargeTPoweR

Untitled

Mar 19th, 2020
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 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 cristallCount;
  15. int cristallPrice = 6;
  16. Console.WriteLine("Сколько у вас золота?");
  17. goldCount = Convert.ToInt32(Console.ReadLine());
  18. Console.WriteLine("Сколько кристаллов по 6 золота вы хотите купить?");
  19. cristallCount = Convert.ToInt32(Console.ReadLine());
  20. goldCount = goldCount % (cristallCount * cristallPrice);
  21. Console.WriteLine($"Теперь у вас в кармане {goldCount} золота и {cristallCount} кристаллов.");
  22. }
  23. }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement