Advertisement
Guest User

Untitled

a guest
Jan 27th, 2019
196
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.18 KB | None | 0 0
  1. using System;
  2.  
  3. namespace ex1
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             double income = double.Parse(Console.ReadLine());
  10.             double averageGrade = double.Parse(Console.ReadLine());
  11.             double minimalWage = double.Parse(Console.ReadLine());
  12.             double socialScholarship = Math.Floor(0.35 * minimalWage);
  13.             double excellentScholarship = Math.Floor(25 * averageGrade);
  14.             bool canHaveSocial = income < minimalWage && averageGrade > 4.50;
  15.             bool canHaveExcellent = averageGrade >= 5.50;
  16.  
  17.             if (!canHaveSocial && !canHaveExcellent)
  18.             {
  19.                 Console.WriteLine("You cannot get a scholarship!");
  20.             }
  21.             else if (canHaveSocial && socialScholarship > excellentScholarship)
  22.             {
  23.                 Console.WriteLine($"You get a Social scholarship {socialScholarship} BGN");
  24.             }
  25.             else if (canHaveExcellent && excellentScholarship >= socialScholarship)
  26.             {
  27.                 Console.WriteLine($"You get a scholarship for excellent results {excellentScholarship} BGN");
  28.             }
  29.  
  30.         }
  31.     }
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement