Advertisement
Guest User

Untitled

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