zhivko1985

Untitled

Apr 2nd, 2020
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.21 KB | None | 0 0
  1. using System;
  2.  
  3. namespace _08._Scholarship
  4. {
  5. class Program
  6. {
  7. static void Main(string[] args)
  8. {
  9. double income = double.Parse(Console.ReadLine());
  10. double averageSuccess = double.Parse(Console.ReadLine());
  11. double minimumWage = double.Parse(Console.ReadLine());
  12.  
  13. double socialScholarship = 0;
  14. double greatSuccess = 0;
  15.  
  16. if (income < minimumWage && averageSuccess > 4.5)
  17. {
  18. socialScholarship = minimumWage * 0.35;
  19. }
  20. if (averageSuccess >= 5.5)
  21. {
  22. greatSuccess = greatSuccess * 25;
  23. }
  24. if (socialScholarship.Equals(0) && greatSuccess.Equals(0))
  25. {
  26. Console.WriteLine("You cannot get a scholarship!");
  27. }
  28. else if (socialScholarship > greatSuccess)
  29. {
  30. Console.WriteLine($"You get a Social scholarship {Math.Floor(socialScholarship)} BGN");
  31. }
  32. else
  33. {
  34. Console.WriteLine($"You get a scholarship for excellent results {Math.Floor(greatSuccess)} BGN");
  35. }
  36. }
  37. }
  38. }
Advertisement
Add Comment
Please, Sign In to add comment