Input string was not a corect format-Error
Здравейте тази грешка ми се появява след въвеждането на входните данни за всяка задача от този тип.Не мога да рзбера какво става;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Logistics
{
class Program
{
static void Main(string[] args)
{
var n = int.Parse(Console.ReadLine());
var count = n;
var sumTons = 0;
var midllePrice = 0;
var microbus = 0; var percentMicrobus = 0;
var truck = 0; var percentTruck = 0;
var train = 0; var percentTrain = 0;
//double sum = 0;
for (int i = 1; i < 1000; i++)
{
count = int.Parse(Console.ReadLine());
sumTons += count;
if (count <= 3)
{
microbus += count;
percentMicrobus = microbus / sumTons * 100;
}
else if (count >= 4 && count <= 11)
{
truck += count;
percentTruck = (truck / sumTons) * 100;
}
else
{
train += count;
percentTrain = train / sumTons * 100;
}
midllePrice = (microbus * 200 + truck * 175 + train * 120) / sumTons;
}
Console.WriteLine(midllePrice);
Console.WriteLine(percentMicrobus);
Console.WriteLine(percentTruck);
Console.WriteLine(percentTrain);
}
}
}