Advertisement
svephoto

Scholarship

Nov 14th, 2019
499
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.44 KB | None | 0 0
  1. using System;
  2.  
  3. namespace Scholarship
  4. {
  5. class Program
  6. {
  7. static void Main(string[] args)
  8. {
  9. //Determine the variables to be entered by the user
  10.  
  11. double salaryParent = double.Parse(Console.ReadLine());
  12. double mark = double.Parse(Console.ReadLine());
  13. double minSalary = double.Parse(Console.ReadLine());
  14.  
  15.  
  16. //Calculate the amount of socila and excellent scholarships
  17.  
  18. double excellentScholarshipCoefficient = 25;
  19. double socialScholarship = Math.Floor(0.35 * minSalary);
  20. double excellentScholarship = Math.Floor(mark * excellentScholarshipCoefficient);
  21.  
  22. if (mark >= 5.50)
  23. {
  24. if (excellentScholarship >= socialScholarship || salaryParent > minSalary)
  25. {
  26. Console.WriteLine($"You get a scholarship for excellent results {excellentScholarship} BGN");
  27. }
  28.  
  29. else
  30. {
  31. Console.WriteLine($"You get a Social scholarship {socialScholarship} BGN");
  32. }
  33. }
  34.  
  35. else if (salaryParent < minSalary && mark > 4.50)
  36. {
  37. Console.WriteLine($"You get a Social scholarship {socialScholarship} BGN");
  38. }
  39.  
  40. else
  41. {
  42. Console.WriteLine("You cannot get a scholarship!");
  43. }
  44. }
  45. }
  46. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement