Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- double incomeInBGN = double.Parse(Console.ReadLine());
- double AverageSuccess = double.Parse(Console.ReadLine());
- double minimalWorkingSalary = double.Parse(Console.ReadLine());
- double SocialScholarship = 0;
- double ExcellentScholarship = 0;
- bool socialScholarshipReq = incomeInBGN < minimalWorkingSalary && AverageSuccess >= 4.5;
- bool excellentScholarshipReq = AverageSuccess >= 5.50;
- if (incomeInBGN > minimalWorkingSalary && AverageSuccess < 4.5)
- {
- Console.WriteLine($"You cannot get a scholarship!");
- }
- else if (incomeInBGN > minimalWorkingSalary && AverageSuccess > 4.5 && AverageSuccess < 5.50)
- {
- Console.WriteLine($"You cannot get a scholarship!");
- }
- else if (incomeInBGN < minimalWorkingSalary && AverageSuccess < 4.5)
- {
- Console.WriteLine($"You cannot get a scholarship!");
- }
- else if (incomeInBGN < minimalWorkingSalary && AverageSuccess >= 4.5 && AverageSuccess < 5.50)
- {
- SocialScholarship += minimalWorkingSalary * 0.35;
- Console.WriteLine($"You get a Social scholarship {Math.Floor(SocialScholarship)} BGN");
- }
- else if (AverageSuccess >= 5.50)
- {
- ExcellentScholarship += AverageSuccess * 25;
- Console.WriteLine($"You get a scholarship for excellent results {Math.Floor(ExcellentScholarship)} BGN");
- }
- else if (incomeInBGN > minimalWorkingSalary && AverageSuccess >= 5.50)
- {
- Console.WriteLine($"You get a scholarship for excellent results {Math.Floor(ExcellentScholarship)} BGN");
- }
- else if (socialScholarshipReq && excellentScholarshipReq)
- {
- SocialScholarship += minimalWorkingSalary * 0.35;
- ExcellentScholarship += AverageSuccess * 25;
- if (ExcellentScholarship >= SocialScholarship)
- {
- Console.WriteLine($"You get a scholarship for excellent results {Math.Floor(ExcellentScholarship)} BGN");
- }
- else
- {
- Console.WriteLine($"You get a Social scholarship {Math.Floor(SocialScholarship)} BGN");
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement