Advertisement
Guest User

Untitled

a guest
Feb 21st, 2020
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.43 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 midScore = double.Parse(Console.ReadLine());
  11.             double minSelary = double.Parse(Console.ReadLine());
  12.  
  13.             double socialScholarship = Math.Floor(minSelary*0.35);
  14.             double Highscholarship = Math.Floor(midScore * 25);
  15.  
  16.             if (income < minSelary && midScore >= 4.5)
  17.             {
  18.                 Console.WriteLine($"You get a Social scholarship {socialScholarship} BGN");
  19.             }
  20.             else if (midScore >= 5.5)
  21.             {
  22.                 Console.WriteLine($"You get a scholarship for excellent results {Highscholarship} BGN");
  23.             }
  24.             else if (income < minSelary && midScore >= 5.5)
  25.             {
  26.                 if (socialScholarship > Highscholarship)
  27.                 {
  28.                    
  29.                     Console.WriteLine($"You get a Social scholarship {socialScholarship} BGN");
  30.                 }
  31.                 else if(Highscholarship>=socialScholarship)
  32.                 {
  33.                    
  34.                     Console.WriteLine($"You get a High scholarship {Highscholarship} BGN");
  35.                 }
  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