Advertisement
Guest User

Untitled

a guest
Nov 14th, 2018
187
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.90 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 Conditional
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. double salary = double.Parse(Console.ReadLine());
  14. double average = double.Parse(Console.ReadLine());
  15. double minWage = double.Parse(Console.ReadLine());
  16.  
  17. double socialScholar = 0;
  18. double excellentScholar = 0;
  19.  
  20. if (average < 4.50)
  21. {
  22. Console.WriteLine("You cannot get a scholarship!");
  23. return;
  24. }
  25.  
  26. if (minWage > salary && average > 4.5)
  27. {
  28. socialScholar = minWage * 0.35;
  29. excellentScholar = average * 25;
  30.  
  31. if (average >= 5.5 && excellentScholar >= socialScholar)
  32. {
  33. Console.WriteLine($"You get a scholarship for excellent results {Math.Floor(excellentScholar)} BGN");
  34. return;
  35. }
  36.  
  37. Console.WriteLine($"You get a Social scholarship {Math.Floor(socialScholar)} BGN");
  38. return;
  39. }
  40. else if (salary > minWage && average >= 5.5)
  41. {
  42. excellentScholar = average * 25;
  43. Console.WriteLine($"You get a scholarship for excellent results {Math.Floor(excellentScholar)} BGN");
  44. return;
  45. }
  46. else if (average >= 5.5)
  47. {
  48. excellentScholar = average * 25;
  49. Console.WriteLine($"You get a scholarship for excellent results {Math.Floor(excellentScholar)} BGN");
  50. return;
  51. }
  52. else
  53. {
  54. Console.WriteLine("You cannot get a scholarship!");
  55. return;
  56. }
  57. }
  58. }
  59. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement