Advertisement
Guest User

Scholarships

a guest
Nov 18th, 2019
285
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.74 KB | None | 0 0
  1. using System;
  2.  
  3. namespace Scholarships
  4. {
  5. class Program
  6. {
  7. static void Main(string[] args)
  8. {
  9. double income = double.Parse(Console.ReadLine());
  10. double averageGrade = double.Parse(Console.ReadLine());
  11. double minimalSalary = double.Parse(Console.ReadLine());
  12.  
  13. double socialScholarship = Math.Floor(minimalSalary * 0.35);
  14. double excellentScholarship = Math.Floor(averageGrade * 25);
  15.  
  16. if (income < minimalSalary && averageGrade > 5.5)//има правo и на двете стипендии
  17. {
  18. if (socialScholarship == excellentScholarship)
  19. {
  20. Console.WriteLine($"You get a scholarship for excellent results {excellentScholarship}BGN");
  21. }
  22. else if (socialScholarship > excellentScholarship)
  23. {
  24. Console.WriteLine($"You get a Social scholarship {socialScholarship} BGN");
  25. }
  26. else if (socialScholarship < excellentScholarship)
  27. {
  28. Console.WriteLine($"You get a scholarship for excellent results {excellentScholarship} BGN");
  29. }
  30. }
  31. else if (income < minimalSalary && averageGrade > 4.5)
  32. {
  33. Console.WriteLine($"You get a Social scholarship {socialScholarship} BGN");
  34. }
  35. else if (averageGrade > 5.5)
  36. {
  37. Console.WriteLine($"You get a scholarship for excellent results {excellentScholarship} BGN");
  38. }
  39. else
  40. {
  41. Console.WriteLine("You cannot get a scholarship!");
  42. }
  43.  
  44.  
  45. }
  46. }
  47. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement