Advertisement
Guest User

Untitled

a guest
Dec 11th, 2017
700
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.22 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 _02.Scholarship
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. double montlyInCome = double.Parse(Console.ReadLine());
  14. double averageGrade = double.Parse(Console.ReadLine());
  15. double minWage = double.Parse(Console.ReadLine());
  16. var social = 0d;
  17. var exGrade = 0d;
  18. if (averageGrade>=4.50&&minWage>montlyInCome)
  19. {
  20. social = minWage * 0.35;
  21. }
  22. if (averageGrade>=5.50)
  23. {
  24. exGrade = averageGrade * 25;
  25. }
  26. if (social!=0||exGrade!=0)
  27. {
  28. var result=Math.Max(social,exGrade);
  29. Console.WriteLine(result == social ?
  30. "You get a Social scholarship {0} BGN" :"You get a scholarship for excellent results {1} BGN",
  31. (Math.Floor(social)),(Math.Floor(exGrade)));
  32. }
  33. else
  34. Console.WriteLine($"You cannot get a scholarship!");
  35. }
  36. }
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement