Advertisement
YORDAN2347

Scholarship

Nov 16th, 2020
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.35 KB | None | 0 0
  1. using System;
  2.  
  3. namespace Scholarship
  4. {
  5. class Program
  6. {
  7. static void Main(string[] args)
  8. {
  9. double earnings = double.Parse(Console.ReadLine());
  10. double success = double.Parse(Console.ReadLine());
  11. double minWage = double.Parse(Console.ReadLine());
  12.  
  13. double scholarship = 0;
  14. string scholarshipType = "noScholarship";
  15. if(earnings <= minWage)
  16. {
  17. if(success >= 4.5)
  18. {
  19. scholarship = 0.35 * minWage;
  20. scholarshipType = "social";
  21. }
  22. }
  23. if(success >= 5.5)
  24. {
  25. if(25* success >= scholarship)
  26. {
  27. scholarship = 25 * success;
  28. scholarshipType = "success";
  29. }
  30. }
  31. if(scholarshipType == "social")
  32. {
  33. Console.WriteLine($"You get a Social scholarship {scholarship} BGN");
  34. }
  35. else if(scholarshipType == "success")
  36. {
  37. Console.WriteLine($"You get a scholarship for excellent results {scholarship} BGN");
  38. }
  39. else
  40. {
  41. Console.WriteLine("You cannot get a scholarship!");
  42. }
  43. }
  44. }
  45. }
  46.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement