Advertisement
Guest User

Untitled

a guest
Nov 2nd, 2019
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.91 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 incomeLv = double.Parse(Console.ReadLine());
  10.             double averageSuccess = double.Parse(Console.ReadLine());
  11.             double minSalаry = double.Parse(Console.ReadLine());
  12.             double socialScholarship = 0.00;
  13.             double scholarship = 0.00;
  14.  
  15.             if (incomeLv <= minSalаry)
  16.             {
  17.                 if (averageSuccess >= 5.50)
  18.                 {
  19.                     socialScholarship = Math.Floor(0.35 * minSalаry);
  20.                     scholarship = Math.Floor(25 * averageSuccess);
  21.                     if (scholarship >= socialScholarship)
  22.                     {
  23.                         Console.WriteLine($"You get a scholarship for excellent results {scholarship} BGN");
  24.                     }
  25.                     else
  26.                     {
  27.                         Console.WriteLine($"You get a Social scholarship {socialScholarship} BGN");
  28.                     }
  29.  
  30.                 }
  31.                 else if (averageSuccess > 4.5)
  32.                 {
  33.                     socialScholarship = Math.Floor(0.35 * minSalаry);
  34.                     Console.WriteLine($"You get a scholarship for excellent results {scholarship} BGN");
  35.                 }
  36.                 else
  37.                 {
  38.                     Console.WriteLine("You cannot get a scholarship!");
  39.                 }
  40.             }
  41.             else
  42.             {
  43.                 if (averageSuccess >= 5.50)
  44.                 {
  45.                     scholarship = Math.Floor(averageSuccess * 25);
  46.                     Console.WriteLine($"You get a scholarship for excellent results {scholarship} BGN");
  47.                 }
  48.                 else
  49.                 {
  50.                     Console.WriteLine("You cannot get a scholarship!");
  51.                 }
  52.             }
  53.  
  54.         }
  55.     }
  56. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement