Advertisement
Guest User

Untitled

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