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