Guest User

Untitled

a guest
Mar 22nd, 2020
187
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.85 KB | None | 0 0
  1. using System;
  2.  
  3. namespace ConsoleApp4
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             double incomeBGN = double.Parse(Console.ReadLine());
  10.             double avgGrade = double.Parse(Console.ReadLine());
  11.             double minWage = double.Parse(Console.ReadLine());
  12.             double scholarship = minWage * 0.35;
  13.             double topScholarship = avgGrade * 25;
  14.             if (incomeBGN >= minWage && avgGrade < 5.50)
  15.             {
  16.                 Console.WriteLine("You cannot get a scholarship!");
  17.             }
  18.             else if (incomeBGN < minWage && avgGrade <= 4.50)
  19.             {
  20.                 Console.WriteLine("You cannot get a scholarship!");
  21.             }
  22.             else if (incomeBGN < minWage && avgGrade > 4.50)
  23.             {
  24.                 Console.WriteLine($"You get a Social scholarship {Math.Floor(scholarship)} BGN");
  25.             }
  26.             else if (incomeBGN >= minWage && avgGrade >= 5.50)
  27.             {
  28.                 Console.WriteLine($"You get a scholarship for excellent results {Math.Floor(topScholarship)} BGN");
  29.             }
  30.             else if (incomeBGN < minWage && avgGrade >= 5.50)
  31.             {
  32.                 if (scholarship > topScholarship)
  33.                 {
  34.                     Console.WriteLine($"You get a Social scholarship {Math.Floor(scholarship)} BGN");
  35.                 }
  36.                 else if (topScholarship > scholarship)
  37.                 {
  38.                     Console.WriteLine($"You get a scholarship for excellent results {Math.Floor(topScholarship)} BGN");
  39.                 }
  40.                 else if (topScholarship == scholarship)
  41.                 {
  42.                     Console.WriteLine($"You get a scholarship for excellent results {Math.Floor(topScholarship)} BGN");
  43.                 }
  44.             }
  45.            
  46.  
  47.         }
  48.     }
  49. }
Advertisement
Add Comment
Please, Sign In to add comment