Advertisement
Guest User

Untitled

a guest
Dec 11th, 2017
580
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.03 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace Scholarship
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. double Income = double.Parse(Console.ReadLine());
  14. double Grades = double.Parse(Console.ReadLine());
  15. double MinimumWage = double.Parse(Console.ReadLine());
  16.  
  17. bool EligibleForSocialScholarship = false;
  18. if (Income < MinimumWage && Grades>4.5) { EligibleForSocialScholarship = true;}
  19.  
  20. bool EligibleForGradesScholarship = false;
  21. if (Grades >= 5.50) { EligibleForGradesScholarship = true; }
  22.  
  23. double AmountOfSocialScholarship = Math.Floor(0.35 * MinimumWage);
  24. double AmountOfMarksScholarship = Math.Floor(25 * Grades);
  25.  
  26. if (EligibleForGradesScholarship == false && EligibleForSocialScholarship == false)
  27. {
  28. Console.WriteLine("You cannot get a scholarship!");
  29. }
  30. else if (EligibleForSocialScholarship == true && EligibleForGradesScholarship == false)
  31. {
  32. Console.WriteLine($"You get a Social scholarship {AmountOfSocialScholarship} BGN");
  33. }
  34. else if (EligibleForSocialScholarship == false && EligibleForGradesScholarship == true)
  35. {
  36. Console.WriteLine($"You get a scholarship for excellent results {AmountOfMarksScholarship} BGN");
  37. }
  38. else if (EligibleForSocialScholarship==true && EligibleForGradesScholarship == true)
  39. {
  40. if (AmountOfSocialScholarship > AmountOfMarksScholarship)
  41. {
  42. Console.WriteLine($"You get a Social scholarship {AmountOfSocialScholarship} BGN");
  43. }
  44. else
  45. {
  46. Console.WriteLine($"You get a scholarship for excellent results {AmountOfMarksScholarship} BGN");
  47. }
  48. }
  49.  
  50. }
  51. }
  52. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement