Advertisement
SvetlanPetrova

Scholarship

Feb 23rd, 2019
256
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.38 KB | None | 0 0
  1. using System;
  2.  
  3. namespace Scholarship
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             double income = double.Parse(Console.ReadLine());
  10.             double aveScore = double.Parse(Console.ReadLine());
  11.             double minWage = double.Parse(Console.ReadLine());
  12.             double scholarship = 0;
  13.  
  14.             if (aveScore > 4.5 && income < minWage)
  15.             {
  16.                 scholarship = minWage * 0.35;
  17.                 Console.WriteLine($"You get a Social scholarship {Math.Floor(scholarship)} BGN");
  18.             }
  19.             else if (aveScore >=5.5)
  20.             {
  21.                 scholarship = aveScore * 25;
  22.                 Console.WriteLine($"You get a scholarship for excellent results {Math.Floor(scholarship)} BGN");
  23.             }
  24.             else if (aveScore >=5.5 && income < minWage && (minWage * 0.35) > (aveScore * 25))
  25.             {
  26.                 Console.WriteLine($"You get a Social scholarship {Math.Floor(scholarship)} BGN");
  27.             }
  28.             else if (aveScore >=5.5 && income < minWage && (aveScore * 25) > (minWage * 0.35))
  29.             {
  30.                 Console.WriteLine($"You get a scholarship for excellent results {Math.Floor(scholarship)} BGN");
  31.             }
  32.             else
  33.             {
  34.                 Console.WriteLine("You cannot get a scholarship!");
  35.             }
  36.         }
  37.     }
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement