Advertisement
Guest User

Untitled

a guest
Feb 19th, 2020
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.28 KB | None | 0 0
  1. using System;
  2.  
  3. namespace _8
  4. {
  5. class Program
  6. {
  7. static void Main()
  8. {
  9. var income = double.Parse(Console.ReadLine());
  10. var grade = double.Parse(Console.ReadLine());
  11. var minimalSalary = double.Parse(Console.ReadLine());
  12.  
  13. var socialScholarship = 35 * minimalSalary / 100;
  14. var excellentScholarship = grade * 25;
  15.  
  16. if (income > minimalSalary && grade < 5.50)
  17. Console.WriteLine("You cannot get a scholarship!");
  18. else if(income < minimalSalary && grade >= 4.50 && grade < 5.50)
  19. Console.WriteLine("You get a Social scholarship {0} BGN", Math.Floor(socialScholarship));
  20. else if(income > minimalSalary && grade >= 5.50)
  21. Console.WriteLine("You get a scholarship for excellent results {0} BGN", Math.Floor(excellentScholarship));
  22. else if(income < minimalSalary && grade >= 5.50)
  23. if(socialScholarship > excellentScholarship)
  24. Console.WriteLine("You get a Social scholarship {0} BGN", Math.Floor(socialScholarship));
  25. else
  26. Console.WriteLine("You get a scholarship for excellent results {0} BGN", Math.Floor(excellentScholarship));
  27.  
  28. }
  29. }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement