Advertisement
Guest User

Untitled

a guest
Jan 21st, 2020
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.06 KB | None | 0 0
  1. using System;
  2.  
  3. namespace TEST
  4. {
  5. class Program
  6. {
  7. static void Main(string[] args)
  8. {
  9. double income = double.Parse(Console.ReadLine());
  10. double grade = double.Parse(Console.ReadLine());
  11. double minSalary = double.Parse(Console.ReadLine());
  12.  
  13.  
  14. double socialScholarship = Math.Floor(0.35 * minSalary);
  15. double exlGradeScholarship = Math.Floor(grade * 25);
  16.  
  17. if (grade >= 5.5)
  18. {
  19. if (exlGradeScholarship > socialScholarship)
  20. {
  21. Console.WriteLine($"You get a scholarship for excellent results {exlGradeScholarship} BGN");
  22. }
  23. else if (exlGradeScholarship < socialScholarship)
  24. {
  25. if (income < minSalary)
  26. {
  27. if (grade >= 4.5)
  28. {
  29. Console.WriteLine($"You get a Social scholarship {socialScholarship} BGN");
  30. }
  31. else
  32. {
  33. Console.WriteLine("You cannot get a scholarship!");
  34. }
  35. }
  36. else
  37. {
  38. Console.WriteLine("You get a scholarship for excellent results {0} BGN", exlGradeScholarship);
  39. }
  40. }
  41. }
  42.  
  43. else if (grade < 5.5)
  44. {
  45. if (income < minSalary)
  46. {
  47. if (grade >= 4.5)
  48. {
  49. Console.WriteLine($"You get a Social scholarship {socialScholarship} BGN");
  50. }
  51. else
  52. {
  53. Console.WriteLine("You cannot get a scholarship!");
  54. }
  55. }
  56. else
  57. {
  58. Console.WriteLine("You cannot get a scholarship!");
  59. }
  60. }
  61.  
  62. }
  63. }
  64. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement