Advertisement
Guest User

Scholarship

a guest
Sep 15th, 2019
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 2.21 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 moneyE = double.Parse(Console.ReadLine());
  10.             double mid = double.Parse(Console.ReadLine());
  11.             double minSalary = double.Parse(Console.ReadLine());
  12.  
  13.             double bonusSocial = 0;
  14.             double bonusExl = 0;
  15.             bonusSocial =Math.Floor(minSalary * 0.35);
  16.             bonusExl =Math.Floor (mid * 25);
  17.                        
  18.  
  19.             if (moneyE < minSalary && mid > 4.5 && mid < 5.5)
  20.             {
  21.                 Console.WriteLine("You get a Social scholarship " + (bonusSocial) + " BGN");
  22.                
  23.             }
  24.             else if (moneyE >= minSalary && mid >= 5.5)
  25.             {                                                                                                
  26.                 Console.WriteLine("You get a scholarship for excellent results " + (bonusExl) + " BGN");    
  27.             }                                                                                                
  28.             else if (moneyE < minSalary && mid >= 5.5)
  29.             {
  30.                 if (bonusSocial > bonusExl)
  31.                 {
  32.                     Console.WriteLine("You get a Social scholarship " + (bonusSocial) + " BGN");
  33.                 }
  34.                 else if (bonusSocial < bonusExl)
  35.                 {
  36.                     Console.WriteLine("You get a scholarship for excellent results " + (bonusExl) + " BGN");
  37.                 }
  38.                 else if (bonusExl == bonusSocial)
  39.                 {
  40.                     Console.WriteLine("You get a scholarship for excellent results " + (bonusExl) + " BGN");
  41.                 }
  42.             }
  43.             else                                                                                            
  44.             {                                                                                              
  45.                 Console.WriteLine("You cannot get a scholarship!");                                        
  46.             }                                                                                              
  47.                
  48.        
  49.  
  50.         }
  51.     }
  52. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement