bacco

Стипендии : Scholarship

Feb 8th, 2018
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.28 KB | None | 0 0
  1. using System;
  2.  
  3. namespace tESt
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             var incomeLv = double.Parse(Console.ReadLine());      //  480
  10.             var averageScore = double.Parse(Console.ReadLine());  //  4.60
  11.             var minSalary  = double.Parse(Console.ReadLine());    //  450.00
  12.  
  13.             double scholarship = 0;
  14.  
  15.  
  16.             if (averageScore <= 4.50)
  17.             {
  18.                 Console.WriteLine("You cannot get a scholarship!");
  19.             }
  20.             else if (averageScore >= 5.50)
  21.             {
  22.  
  23.                     scholarship = averageScore * 25;
  24.                     scholarship = Math.Floor(scholarship);
  25.                 Console.WriteLine($"You get a scholarship for excellent results {scholarship} BGN");
  26.            
  27.         }
  28.             else
  29.             {
  30.                 if (incomeLv <= minSalary)
  31.                 {
  32.                     scholarship = minSalary * 0.35;
  33.                     scholarship = Math.Floor(scholarship);
  34.                     Console.WriteLine($"You get a Social scholarship {scholarship} BGN");
  35.                 }
  36.                 else
  37.                 {
  38.                     Console.WriteLine("You cannot get a scholarship!");
  39.                 }
  40.             }
  41.         }
  42.     }
  43. }
Advertisement
Add Comment
Please, Sign In to add comment