Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace Mogeashvili_Lesson_1
- {
- class Program
- {
- static void Main(string[] args)
- {
- Console.WriteLine("Привет!");
- Console.WriteLine();
- string debit = "";
- Console.Write("Введите доход: ");
- debit = Console.ReadLine();
- Console.WriteLine("Ваш доход: " + debit);
- Console.WriteLine();
- string credit = "";
- Console.Write("Введите расход: ");
- credit = Console.ReadLine();
- Console.WriteLine("Ваш расход: " + credit);
- int debitInt = 0;
- int creditInt = 0;
- int.TryParse(debit, out debitInt);
- int.TryParse(credit, out creditInt);
- int balance = debitInt - creditInt;
- Console.WriteLine();
- Console.WriteLine("Ваш баланс: "+ balance);
- Console.ReadKey();
- Console.ReadKey();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement