Advertisement
Guest User

1.6

a guest
May 15th, 2019
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.91 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 ConsoleApp1
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             int gold;
  14.             int cri;
  15.             int criPrice = 257;            
  16.             Console.Write("Введите начальное количество золота ");
  17.             gold = Convert.ToInt32(Console.ReadLine());
  18.             Console.Write("Сколько кристаллов вы хотите купить? ");
  19.             cri = Convert.ToInt32(Console.ReadLine());
  20.             gold = gold - cri * 257;
  21.             Console.Write("оставшаяся сумма : " + gold);
  22.             Console.WriteLine();
  23.             Console.Write("количество купленных кристаллов : " + cri);
  24.             Console.ReadKey();
  25.         }
  26.     }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement