Advertisement
tsvetelinapasheva

TsvetelinaPasheva/ConditionalStatementsExercise/08.Scholarship

Jan 19th, 2021
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 2.39 KB | None | 0 0
  1. using System;
  2.  
  3. namespace ConsoleApp13
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.  
  10.             double incomeBGN = double.Parse(Console.ReadLine());
  11.             double grade = double.Parse(Console.ReadLine());
  12.             double minimalSalary = double.Parse(Console.ReadLine());
  13.  
  14.             double socialScholarship = Math.Floor(minimalSalary * 0.35);
  15.             double excellentScholarship = Math.Floor(grade * 25);
  16.  
  17.  
  18.  
  19.             if (incomeBGN > minimalSalary && grade < 4.50)
  20.             {
  21.                 Console.WriteLine("You cannot get a scholarship!");
  22.             }
  23.  
  24.             else if (incomeBGN < minimalSalary && grade < 4.50)
  25.             {
  26.                 Console.WriteLine("You cannot get a scholarship!");
  27.             }
  28.  
  29.             else if (incomeBGN < minimalSalary && grade > 4.50)
  30.             {
  31.                 Console.WriteLine($"You get a Social scholarship {socialScholarship} BGN");
  32.             }
  33.  
  34.             else if (incomeBGN > minimalSalary && grade < 4.50)
  35.             {
  36.                 Console.WriteLine("You cannot get a scholarship!");
  37.             }
  38.  
  39.             else if (incomeBGN <= minimalSalary && grade < 5.50)
  40.             {
  41.                 Console.WriteLine("You cannot get a scholarship!");
  42.             }
  43.  
  44.             else if (incomeBGN >= minimalSalary && grade < 5.50)
  45.             {
  46.                 Console.WriteLine("You cannot get a scholarship!");
  47.             }
  48.  
  49.             else if (incomeBGN >= minimalSalary && grade >= 5.50)
  50.             {
  51.                 Console.WriteLine($"You get a scholarship for excellent results {excellentScholarship} BGN");
  52.             }
  53.  
  54.             else if (incomeBGN <= minimalSalary && grade >= 5.50)
  55.             {
  56.                 Console.WriteLine($"You get a scholarship for excellent results {excellentScholarship} BGN");
  57.             }
  58.  
  59.            
  60.  
  61.             else if (incomeBGN < minimalSalary && grade >= 5.50 && socialScholarship <= excellentScholarship)
  62.             {
  63.                 Console.WriteLine($"You get a scholarship for excellent results {excellentScholarship} BGN");
  64.             }
  65.  
  66.             else if (incomeBGN < minimalSalary && grade >= 5.50 && socialScholarship > excellentScholarship)
  67.             {
  68.                 Console.WriteLine($"You get a Social scholarship {socialScholarship} BGN");
  69.             }
  70.  
  71.  
  72.  
  73.  
  74.  
  75.  
  76.         }
  77.  
  78.     }
  79. }
  80.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement