Advertisement
Guest User

Untitled

a guest
Mar 28th, 2020
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.51 KB | None | 0 0
  1. using System;
  2.  
  3. namespace teeST
  4. {
  5. class Program
  6. {
  7. static void Main(string[] args)
  8. {
  9. double income = double.Parse(Console.ReadLine());
  10. double averageMark = double.Parse(Console.ReadLine());
  11. double minimalWorkingWage = double.Parse(Console.ReadLine());
  12.  
  13. double socialScholarship = 0;
  14. double excellentScholarship = 0;
  15.  
  16. if (income < minimalWorkingWage && averageMark > 4.50 && averageMark <= 6.00)
  17. {
  18. socialScholarship = minimalWorkingWage * 0.35;
  19. }
  20.  
  21. if (averageMark >= 5.50 && averageMark <= 6.00)
  22. {
  23. excellentScholarship = averageMark * 25;
  24. }
  25.  
  26. if (socialScholarship == 0 && excellentScholarship == 0)
  27. {
  28. Console.WriteLine("You cannot get a scholarship!");
  29. }
  30. else if (socialScholarship > excellentScholarship)
  31. {
  32. Console.WriteLine($"You get a Social scholarship {Math.Floor(socialScholarship)} BGN");
  33. }
  34. else if (excellentScholarship > socialScholarship)
  35. {
  36. Console.WriteLine($"You get a Social scholarship {Math.Floor(excellentScholarship)} BGN");
  37. }
  38. else if (excellentScholarship == socialScholarship)
  39. {
  40. Console.WriteLine($"You get a Social scholarship {Math.Floor(excellentScholarship)} BGN");
  41. }
  42. }
  43. }
  44. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement