Advertisement
Guest User

Sholarship

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