Advertisement
Guest User

Untitled

a guest
Sep 22nd, 2018
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.38 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace Scholarship
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             double incomeInLeva = double.Parse(Console.ReadLine());
  14.             double averageGrade = double.Parse(Console.ReadLine());
  15.             double minimumSalary = double.Parse(Console.ReadLine());
  16.  
  17.             double socialScholarship = 0;
  18.             double exellentScholarship = 0;
  19.  
  20.             if (incomeInLeva < minimumSalary)
  21.             {
  22.                 socialScholarship = minimumSalary * 0.35;
  23.             }
  24.             if (averageGrade >= 5.5)
  25.             {
  26.                 exellentScholarship = averageGrade * 25;
  27.             }
  28.  
  29.             if (incomeInLeva < minimumSalary && averageGrade >= 4.5 && socialScholarship > exellentScholarship)
  30.             {
  31.                 Console.WriteLine($"You get a Social scholarship {Math.Floor(socialScholarship)} BGN");
  32.             }
  33.             else if (averageGrade >= 5.5 && exellentScholarship >= socialScholarship)
  34.             {
  35.                 Console.WriteLine($"You get a scholarship for excellent results {Math.Floor(exellentScholarship)} BGN");
  36.             }
  37.             else
  38.             {
  39.                 Console.WriteLine("You cannot get a scholarship!");
  40.             }
  41.         }
  42.     }
  43. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement