Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace ex1
- {
- class Program
- {
- static void Main(string[] args)
- {
- double income = double.Parse(Console.ReadLine());
- double averageGrade = double.Parse(Console.ReadLine());
- double minimalWage = double.Parse(Console.ReadLine());
- double socialScholarship = Math.Floor(0.35 * minimalWage);
- double excellentScholarship = Math.Floor(25 * averageGrade);
- bool canHaveSocial = income < minimalWage && averageGrade > 4.50;
- bool canHaveExcellent = averageGrade >= 5.50;
- if (!canHaveSocial && !canHaveExcellent)
- {
- Console.WriteLine("You cannot get a scholarship!");
- }
- else if (canHaveSocial && socialScholarship > excellentScholarship)
- {
- Console.WriteLine($"You get a Social scholarship {socialScholarship} BGN");
- }
- else if (canHaveExcellent && excellentScholarship >= socialScholarship)
- {
- Console.WriteLine($"You get a scholarship for excellent results {excellentScholarship} BGN");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement