Advertisement
Guest User

Untitled

a guest
Jan 22nd, 2020
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.33 KB | None | 0 0
  1. double earnings = double.Parse(Console.ReadLine());
  2. double averageMark = double.Parse(Console.ReadLine());
  3. double lowestEarning = double.Parse(Console.ReadLine());
  4.  
  5. double socialScholarship = 0.35 * lowestEarning;
  6. double excellentScholarship = averageMark * 25;
  7.  
  8. if (lowestEarning < earnings || averageMark < 4.50)
  9. {
  10. Console.WriteLine("You cannot get a scholarship!");
  11. }
  12. else if (lowestEarning >= earnings && averageMark >= 4.50)
  13. {
  14. Console.WriteLine($"You get a Social scholarship {Math.Floor(socialScholarship)} BGN");
  15. }
  16. else if (lowestEarning < earnings && averageMark >= 5.50)
  17. {
  18. Console.WriteLine($"You get a scholarship for excellent results {Math.Floor(excellentScholarship)} BGN");
  19. }
  20. else
  21. {
  22. if (excellentScholarship>=socialScholarship)
  23. {
  24. Console.WriteLine($"You get a scholarship for excellent results {Math.Floor(excellentScholarship)} BGN");
  25. }
  26. else
  27. {
  28. Console.WriteLine($"You get a Social scholarship {Math.Floor(socialScholarship)} BGN");
  29. }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement