Advertisement
Guest User

Untitled

a guest
Feb 21st, 2019
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.34 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 incomeBGN = double.Parse(Console.ReadLine());
  10.             double midGrade = double.Parse(Console.ReadLine());
  11.             double minSalary = double.Parse(Console.ReadLine());
  12.  
  13.            
  14.             double socialS = Math.Floor(minSalary * 0.35);
  15.             double excellentR = Math.Floor(midGrade * 25);
  16.  
  17.             if (incomeBGN < minSalary && midGrade > 4.50)
  18.             {
  19.                 Console.WriteLine($"You get a Social scholarship {socialS} BGN");
  20.             }
  21.             else if (midGrade >= 5.50)
  22.             {
  23.                 Console.WriteLine($"You get a scholarship for excellent results {excellentR} BGN");
  24.             }
  25.             else if (incomeBGN <= minSalary && midGrade >= 5.50 && excellentR >= socialS)
  26.             {
  27.                 Console.WriteLine($"You get a scholarship for excellent results {excellentR} BGN");
  28.             }
  29.             else if (incomeBGN <= minSalary && midGrade >= 5.50 && excellentR < socialS)
  30.             {
  31.                 Console.WriteLine($"You get a Social scholarship {socialS} BGN");
  32.             }
  33.             else
  34.             {
  35.                 Console.WriteLine("You cannot get a scholarship!");
  36.             }
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.         }
  44.     }
  45. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement