Why judge do not accept this answer? Is the same as Sania made in class.
using System;
namespace Account_Balance
{
class Program
{
static void Main()
{
int numOfOperations = int.Parse(Console.ReadLine());
int counter = 0;
double total = 0;
while (counter < numOfOperations)
{
double deposit = double.Parse(Console.ReadLine());
if (deposit < 0)
{
Console.WriteLine("Invalid operation"!);
break;
}
Console.WriteLine($"Increase: {deposit:f2}");
counter++;
total += deposit;
}
Console.WriteLine($"Total:{total:f2}");
}
}
}
Zdraveite,
Account Balance. Mersi
Здравей,
Има една "!" извън кавичките: Console.WriteLine("Invalid operation"!);
Трябва да има празбо място след "Total": Console.WriteLine($"Total: {total:f2}");
Mnogo Blagodarq! Tova beshe problema veche e 100/100