6.Travelling_Nested_Loops_C#
https://pastebin.com/BkkNCRpz 66/100 с Runtime error? Някой да предложи негов вариант на задачата?
https://pastebin.com/BkkNCRpz 66/100 с Runtime error? Някой да предложи негов вариант на задачата?
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace _06.Travelling
{
class Program
{
static void Main(string[] args)
{
string destination = string.Empty;
double money = 0;
while (true)
{
destination = Console.ReadLine();
if (destination == "End")
{
break;
}
double neededMoney = double.Parse(Console.ReadLine());
double savedMoney = 0;
while (neededMoney > savedMoney)
{
money = double.Parse(Console.ReadLine());
savedMoney += money;
}
Console.WriteLine($"Going to {destination}!");
}
}
}
}
double, double, double