Yachkov

Scholarship unfinished

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