daily pastebin goal
12%
SHARE
TWEET

Урок 1 Задача 6

Vastimofeev Jan 22nd, 2019 60 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. uint Gold; //Кол-во золота
  2. uint Crystals; //Кол-во кристаллов
  3. uint CrystalPrice = 3; //Цена кристалла
  4. Console.Write("Сколько у Вас золота? ");
  5. Gold = Convert.ToUInt32(Console.ReadLine());
  6. Console.WriteLine("1 кристал = {0} монет", CrystalPrice);
  7. Console.Write("Сколько кристаллов хотите купить? ");
  8. Crystals = Convert.ToUInt32(Console.ReadLine());
  9. Gold -= Crystals * CrystalPrice;
  10. Console.WriteLine("У вас осталось {0} монет(ы) {1} кристалл(а)(ов)", Gold, Crystals);
  11. Console.ReadLine();
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top