Scholarship
Здравейте,
Зациклих с решението на дадената задача. Като я дебъгвам не откривам грешки. Може ли да помогнете?
ето го и кода:
using System;
namespace Scholarship
{
class Program
{
static void Main(string[] args)
{
var income = double.Parse(Console.ReadLine());
var score = double.Parse(Console.ReadLine());
var min_income = double.Parse(Console.ReadLine());
double scholarship = 0.0;
double social = 0.0;
if (income < min_income)
{
social = min_income * 0.35;
if (score >= 5.5)
{
scholarship = score * 25.0;
if (social > scholarship)
{
Console.WriteLine("You get a Social scholarship {0} BGN", Math.Floor( social));
}
else
{
Console.WriteLine("You get a scholarship for excellent result {0} BGN", Math.Floor( scholarship));
}
}
else if (score > 4.5)
{
Console.WriteLine("You get a Social scholarship {0} BGN", Math.Floor (social));
}
else
{
Console.WriteLine("You cannot get a scholarship!");
}
}
else
{
if (score >= 5.5)
{
scholarship = score * 25.0;
Console.WriteLine("You get a scholarship for excellent result {0} BGN", Math.Floor ( scholarship));
}
else
{
Console.WriteLine("You cannot get a scholarship!");
}
}
}
}
}