Advertisement
rukvir

convert

Dec 2nd, 2021
785
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.20 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 HomeWorck_1_1
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             float usd;
  14.             float rub;
  15.             float cny;
  16.             string check = "";
  17.  
  18.             Console.WriteLine("Сколько у вас валюты?");
  19.             Console.WriteLine("Введите количество USD");
  20.             usd = Convert.ToSingle(Console.ReadLine());
  21.             Console.WriteLine("Введите количество RUB");
  22.             rub = Convert.ToSingle(Console.ReadLine());
  23.             Console.WriteLine("Введите количество CNY");
  24.             cny = Convert.ToSingle(Console.ReadLine());
  25.  
  26.             while (check != "exit")
  27.             {
  28.                 Console.WriteLine($"На вашем балансе: {usd} долларов, {rub} рублей, {cny} юаней.");
  29.                 Console.WriteLine()
  30.                 Console.WriteLine("Чтобы выйти из конвертера валют напишите: exit");
  31.                 check = Console.ReadLine();
  32.             }
  33.         }
  34.     }
  35. }
  36.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement