Problem 1. SoftUni Airline
Здравейте, стигам до тук със задачата и не мога да продължа.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
class Program
{
static void Main()
{
int flights = int.Parse(Console.ReadLine());
int Income = 0;
int Fuel = 0;
int Overall = 0;
int Average = 0;
for (int i = 0; i < flights; i++)
{
int Apass = int.Parse(Console.ReadLine());
int Aprice = int.Parse(Console.ReadLine());
int Ypass = int.Parse(Console.ReadLine());
int Yprice = int.Parse(Console.ReadLine());
int Fprice = int.Parse(Console.ReadLine());
int Fconsume = int.Parse(Console.ReadLine());
int Fduration = int.Parse(Console.ReadLine());
Income = Apass * Aprice + Ypass * Yprice;
Fuel = Fprice * Fconsume * Fduration;
}
if (Income >= Fuel)
{
Console.WriteLine("You are ahead with {0:f3}$.", Income - Fuel);
}
else
{
Console.WriteLine("We've got to sell more tickets! We've lost {0:f3}$.", Income - Fuel);
}
}
}
моля за малко помощ. :)