Last active
September 16, 2019 06:13
-
-
Save kkaraivanov/f3f4c2fb246fc7641831fb2351746df3 to your computer and use it in GitHub Desktop.
Scholarship
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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