Advertisement
Guest User

Untitled

a guest
Nov 21st, 2019
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.39 KB | None | 0 0
  1. using System;
  2.  
  3. public class Program
  4. {
  5. public static void Main()
  6. {
  7. double profit = double.Parse(Console.ReadLine());
  8. double grade = double.Parse(Console.ReadLine());
  9. double minSalary = double.Parse(Console.ReadLine());
  10.  
  11. if (grade <= 4.5)
  12. {
  13. Console.WriteLine("You cannot get a scholarship!");
  14. }
  15. else if (grade > 4.5 && grade <= 5.4 && profit > minSalary)
  16. {
  17. Console.WriteLine("You cannot get a scholarship!");
  18. }
  19. else if (grade > 4.5 && grade <= 5.4 && profit < minSalary)
  20. {
  21. double scholarshipByProfit = minSalary * 0.35;
  22. double scholarship = Math.Floor(scholarshipByProfit);
  23. Console.WriteLine($"You get a Social scholarship {scholarship} BGN");
  24. }
  25. else if (grade >= 5.5)
  26. {
  27. double scholarshipByGrade = grade * 25;
  28. double scholarship = Math.Floor(scholarshipByGrade);
  29. Console.WriteLine($"You get a scholarship for excellent results {scholarship} BGN");
  30. }
  31. else if (grade > 4.5 && profit < minSalary && (grade * 25) > (minSalary * 0.35))
  32. {
  33. double scholarship = Math.Floor(grade * 25);
  34. Console.WriteLine($"You get a scholarship for excellent results {scholarship} BGN");
  35. }
  36. else if (grade > 4.5 && profit < minSalary && (minSalary * 0.35) > (grade * 25))
  37. {
  38. double scholarship = Math.Floor(minSalary * 0.35);
  39. Console.WriteLine($"You get a Social scholarship {scholarship} BGN");
  40. }
  41. }
  42.  
  43. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement