Advertisement
poli_rk

Untitled

Sep 22nd, 2020
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.43 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 income = double.Parse(Console.ReadLine());
  10. double avgGrade = double.Parse(Console.ReadLine());
  11. double minSalary = double.Parse(Console.ReadLine());
  12.  
  13. double socialScholarship = Math.Floor(minSalary * 0.35);
  14. double gradeScholarchip = Math.Floor(avgGrade * 25);
  15. string result = "";
  16.  
  17. if (avgGrade >= 5.5 && income <= minSalary && gradeScholarchip >= socialScholarship)
  18. {
  19. result = $"You get a scholarship for excellent results {gradeScholarchip} BGN";
  20. }
  21. else if (avgGrade >= 5.5 && income <= minSalary && gradeScholarchip <= socialScholarship)
  22. {
  23. result = $"You get a Social scholarship {socialScholarship} BGN";
  24. }
  25. else if (avgGrade >= 5.5 && income >= minSalary)
  26. {
  27. result = $"You get a scholarship for excellent results {gradeScholarchip} BGN";
  28. }
  29. else if (avgGrade >= 4.5 && income < minSalary)
  30. {
  31. result = $"You get a Social scholarship {socialScholarship} BGN";
  32. }
  33. else
  34. {
  35. result = "You cannot get a scholarship!";
  36. }
  37.  
  38. Console.WriteLine(result);
  39.  
  40.  
  41. }
  42. }
  43. }
  44.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement