Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Runtime.InteropServices;
- using System.Text;
- using System.Threading.Tasks;
- namespace ConsoleApp6
- {
- internal class Program
- {
- static void Main(string[] args)
- {
- int goldCharacter;
- int characterCrystals;
- int costCrystal = 5;
- Console.Write("Сколько у вас золота : ");
- goldCharacter = Convert.ToInt32(Console.ReadLine());
- Console.WriteLine();
- Console.Write("Сколько кристаллов вы хотите приобрести : ");
- characterCrystals = Convert.ToInt32(Console.ReadLine());
- Console.WriteLine();
- goldCharacter -= characterCrystals * costCrystal;
- Console.WriteLine($"Куплено {characterCrystals} кристаллов , осталось {goldCharacter} золота.");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment