Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace Account_Balance
- {
- class Program
- {
- static void Main(string[] args)
- {
- int CountVnoski = int.Parse(Console.ReadLine());
- double total = 0;
- while(CountVnoski != 0)
- {
- double Vnoska = double.Parse(Console.ReadLine());
- if (Vnoska > 0)
- {
- Console.WriteLine($"Increase: {Vnoska:f2}");
- CountVnoski--;
- }
- else
- {
- Console.WriteLine("Invalid operation!");
- break;
- }
- total += Vnoska;
- }
- Console.WriteLine($"Total: {total:f2}");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment