Advertisement
IvanBorisovG

Retardsko решение

Dec 28th, 2017
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 2.44 KB | None | 0 0
  1.             double incomeInBGN = double.Parse(Console.ReadLine());
  2.             double AverageSuccess = double.Parse(Console.ReadLine());
  3.             double minimalWorkingSalary = double.Parse(Console.ReadLine());
  4.  
  5.             double SocialScholarship = 0;
  6.             double ExcellentScholarship = 0;
  7.             bool socialScholarshipReq = incomeInBGN < minimalWorkingSalary && AverageSuccess >= 4.5;
  8.             bool excellentScholarshipReq = AverageSuccess >= 5.50;
  9.             if (incomeInBGN > minimalWorkingSalary && AverageSuccess < 4.5)
  10.             {
  11.                 Console.WriteLine($"You cannot get a scholarship!");
  12.             }
  13.             else if (incomeInBGN > minimalWorkingSalary && AverageSuccess > 4.5 && AverageSuccess < 5.50)
  14.             {
  15.                 Console.WriteLine($"You cannot get a scholarship!");
  16.             }
  17.             else if (incomeInBGN < minimalWorkingSalary && AverageSuccess < 4.5)
  18.             {
  19.                 Console.WriteLine($"You cannot get a scholarship!");
  20.             }
  21.             else if (incomeInBGN < minimalWorkingSalary && AverageSuccess >= 4.5 && AverageSuccess < 5.50)
  22.             {
  23.                 SocialScholarship += minimalWorkingSalary * 0.35;
  24.                 Console.WriteLine($"You get a Social scholarship {Math.Floor(SocialScholarship)} BGN");
  25.             }
  26.             else if (AverageSuccess >= 5.50)
  27.             {
  28.                 ExcellentScholarship += AverageSuccess * 25;
  29.                 Console.WriteLine($"You get a scholarship for excellent results {Math.Floor(ExcellentScholarship)} BGN");
  30.             }
  31.             else if (incomeInBGN > minimalWorkingSalary && AverageSuccess >= 5.50)
  32.             {
  33.                 Console.WriteLine($"You get a scholarship for excellent results {Math.Floor(ExcellentScholarship)} BGN");
  34.             }
  35.             else if (socialScholarshipReq && excellentScholarshipReq)
  36.             {
  37.                 SocialScholarship += minimalWorkingSalary * 0.35;
  38.                 ExcellentScholarship += AverageSuccess * 25;
  39.  
  40.                 if (ExcellentScholarship >= SocialScholarship)
  41.                 {
  42.                     Console.WriteLine($"You get a scholarship for excellent results {Math.Floor(ExcellentScholarship)} BGN");
  43.                 }
  44.                 else
  45.                 {
  46.                     Console.WriteLine($"You get a Social scholarship {Math.Floor(SocialScholarship)} BGN");
  47.                 }
  48.             }
  49.         }
  50.     }
  51. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement