peter1998 5 Точки

## Logistic Exam 18 november evening 2016

по някаква причина дава 40/100 точки ,а всичко си е нормално
помогнете да я оправя за judge .

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace _04.Logistic
{
class Program
{
static void Main(string[] args)
{

int microbus = 0;
int truck = 0;
int train = 0;
int alltons = 0;
for (int i = 0; i < weightForTransport; i++)
{
if (tons<=3)
{
microbus+=tons;
alltons +=  tons;
}
else if (tons>3 && tons<11)
{
truck+=tons;
alltons += tons;
}
else if (tons>12)
{
train+=tons;
alltons += tons;
}
}

double middleTon = (double)(microbus * 200 + truck * 175 + train * 120) / alltons;

Console.WriteLine(\$"{middleTon:f2}");
Console.WriteLine(\$"{(double)microbus*100 / alltons:f2}%");
Console.WriteLine(\$"{(double)truck*100 / alltons:f2}%");
Console.WriteLine(\$"{(double)train*100 / alltons:f2}%");
}
}
}

Тагове:
0
icowwww 946 Точки

Оправи:
else if (tons >= 4 && tons <= 11)  От 4 до 11 тона
else if (tons >= 12)                       12 и повече тона

1
24/08/2017 16:53:50