Advertisement
OleJkeen

homeWork#1

May 23rd, 2022 (edited)
702
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. int userGold;
  2. int crystalsCount;
  3. int crystalsPrice = 10;
  4. Console.Write("Сколько у Вас золота?:");
  5. userGold = Convert.ToInt32(Console.ReadLine());
  6. Console.Write("Сколько кристаллов Вы хотите купить:");
  7. crystalsCount = Convert.ToInt32(Console.ReadLine());
  8. userGold -= crystalsCount * crystalsPrice;
  9. Console.WriteLine("У Вас осталось " + crystalsCount + "кристаллов," + userGold + "золота");
Advertisement
RAW Paste Data Copied
Advertisement