Advertisement
Guest User

Untitled

a guest
Nov 14th, 2018
188
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.41 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 (minWage>salary && average > 4.5)
  21. {
  22. socialScholar = minWage * 0.35;
  23. excellentScholar = average * 25;
  24.  
  25. if (average >= 5.5 && excellentScholar>=socialScholar)
  26. {
  27. Console.WriteLine($"You get a scholarship for excellent results {Math.Floor(excellentScholar)} BGN");
  28. return;
  29. }
  30.  
  31. Console.WriteLine($"You get a Social scholarship {Math.Floor(socialScholar)} BGN");
  32. }
  33. else if (salary>minWage && average >= 5.5)
  34. {
  35. excellentScholar = average * 25;
  36. Console.WriteLine($"You get a scholarship for excellent results {Math.Floor(excellentScholar)} BGN");
  37. }
  38. else
  39. {
  40. Console.WriteLine("You cannot get a scholarship!");
  41. }
  42. }
  43. }
  44. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement