Conditional Statements Exercise - 8. *Стипендии
Здравейте! Някой има ли идея, защо получавам 81/100 със следният код:
using System;
namespace ConsoleApp46
{
class Program
{
static void Main(string[] args)
{
double incomes = double.Parse(Console.ReadLine());
double grades = double.Parse(Console.ReadLine());
double minSalary = double.Parse(Console.ReadLine());
double scholarship = Math.Floor(minSalary * 0.35);
double scholarshipExellent = Math.Floor(grades * 25);
if (incomes > minSalary)
{
if (grades >= 5.50)
{
Console.WriteLine($"You get a scholarship for excellent results {scholarshipExellent} BGN");
}
else
{
Console.WriteLine("You cannot get a scholarship!");
}
}
else if (incomes < minSalary)
{
if (grades < 5.50 && grades > 4.50)
{
Console.WriteLine($"You get a Social scholarship {scholarship} BGN");
}
else if (grades >= 5.50)
{
if (scholarship <= scholarshipExellent)
{
Console.WriteLine($"You get a scholarship for excellent results {scholarshipExellent} BGN");
}
else
{
Console.WriteLine($"You get a Social scholarship {scholarship} BGN");
}
}
}
}
}
}
Благодаря предварително!