Advertisement
Guest User

Untitled

a guest
Feb 23rd, 2020
215
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.55 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 grades = double.Parse(Console.ReadLine());
  11.             double minimalIncome = double.Parse(Console.ReadLine());
  12.  
  13.             double socialPrice = minimalIncome * 0.35;
  14.             double excellentPrice = grades * 25;
  15.             if (grades <= 4.5)
  16.             {
  17.                 Console.WriteLine("You cannot get a scholarship!");
  18.             }
  19.             else if (grades <= 5.5 && income > minimalIncome)
  20.             {
  21.                 Console.WriteLine("You cannot get a scholarship!");
  22.             }
  23.             else if (grades > 4.5 && grades < 5.5 && income < minimalIncome )
  24.             {
  25.                 Console.WriteLine($"You get a Social scholarship {socialPrice} BGN");
  26.             }
  27.             else if (grades >= 5.5 && income < minimalIncome)
  28.             {
  29.                 if (socialPrice > excellentPrice)
  30.                 {
  31.                     Console.WriteLine($"You get a Social scholarship {socialPrice} BGN");
  32.                 }
  33.                 else if (socialPrice < excellentPrice)
  34.                 {
  35.                     Console.WriteLine($"You get a scholarship for excellent results {excellentPrice} BGN");
  36.                 }
  37.             }
  38.             else
  39.             {
  40.                 Console.WriteLine($"You get a scholarship for excellent results {excellentPrice} BGN");
  41.             }
  42.              
  43.  
  44.  
  45.         }
  46.     }
  47. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement