Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace Scholarship
- {
- class Program
- {
- static void Main(string[] args)
- {
- double incomeBGN = double.Parse(Console.ReadLine());
- double averageGrade = double.Parse(Console.ReadLine());
- double minimumSalary = double.Parse(Console.ReadLine());
- double socialScholarship = 0;
- double excellentResultScholarship = 0;
- if (averageGrade >= 4.50 && minimumSalary > incomeBGN)
- {
- socialScholarship = minimumSalary * 0.35;
- }
- if (averageGrade >= 5.50)
- {
- excellentResultScholarship = averageGrade * 25;
- }
- if (socialScholarship != 0 || excellentResultScholarship != 0)
- {
- var result = Math.Max(socialScholarship, excellentResultScholarship);
- Console.WriteLine(result == socialScholarship ?
- "You get a Social scholarship {0} BGN" : "You get a scholarship for excellent results {1} BGN",
- (Math.Floor(socialScholarship)), (Math.Floor(excellentResultScholarship)));
- }
- else
- {
- Console.WriteLine($"You cannot get a scholarship!");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement