Guest User

Untitled

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