Advertisement
IvanBorisovG

Scholarship

Dec 28th, 2017
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.10 KB | None | 0 0
  1.             double dohodlv = double.Parse(Console.ReadLine());
  2.             double sredenuspeh = double.Parse(Console.ReadLine());
  3.             double minrabzaplata = double.Parse(Console.ReadLine());
  4.  
  5.             double scholarship = 0;
  6.             double otlichen = 0;
  7.  
  8.             if (dohodlv < minrabzaplata && sredenuspeh > 4.50)
  9.             {
  10.                 scholarship = minrabzaplata * 0.35;
  11.             }
  12.             if (sredenuspeh >= 5.50)
  13.             {
  14.                 otlichen = sredenuspeh * 25;
  15.             }
  16.  
  17.             scholarship = Math.Floor(scholarship);
  18.             otlichen = Math.Floor(otlichen);
  19.  
  20.             if (scholarship == 0 && otlichen == 0)
  21.             {
  22.                 Console.WriteLine($"You cannot get a scholarship!");
  23.             }
  24.             else if (scholarship > otlichen)
  25.             {
  26.                 Console.WriteLine($"You get a Social scholarship {scholarship} BGN");
  27.             }
  28.             else
  29.             {
  30.                 Console.WriteLine($"You get a scholarship for excellent results {otlichen} BGN");
  31.             }
  32.  
  33.         }
  34.     }
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement