Skip to content

Instantly share code, notes, and snippets.

@kkaraivanov
Last active September 16, 2019 06:13
Show Gist options
  • Save kkaraivanov/f3f4c2fb246fc7641831fb2351746df3 to your computer and use it in GitHub Desktop.
Save kkaraivanov/f3f4c2fb246fc7641831fb2351746df3 to your computer and use it in GitHub Desktop.
Scholarship
using System;
namespace Scholarship
{
class Program
{
static void Main(string[] args)
{
double incomePrice = double.Parse(Console.ReadLine());
double averageSuccess = double.Parse(Console.ReadLine());
double minimumSalary = double.Parse(Console.ReadLine());
double scholarship = Math.Floor(minimumSalary * 0.35);
double theBestSuccess = Math.Floor(averageSuccess * 25);
double printEscelentScholership = 0;
if (scholarship > theBestSuccess)
{
printEscelentScholership = scholarship;
}
else
{
printEscelentScholership = theBestSuccess;
}
if (incomePrice <= minimumSalary && averageSuccess > 4.5 && averageSuccess < 5.5)
{
Console.WriteLine($"You get a Social scholarship {scholarship} BGN");
}
else if (incomePrice <= minimumSalary && averageSuccess >= 5.5)
{
Console.WriteLine($"You get a scholarship for excellent results {printEscelentScholership} BGN");
}
else if (incomePrice > minimumSalary && averageSuccess >= 5.5)
{
Console.WriteLine($"You get a scholarship for excellent results {theBestSuccess} BGN");
}
else
{
Console.WriteLine("You cannot get a scholarship!");
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment