Advertisement
Guest User

Scholarship

a guest
May 26th, 2019
236
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.33 KB | None | 0 0
  1. using System;
  2.  
  3. namespace ConsoleApp1
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {          
  9.            
  10.             double incomes = double.Parse(Console.ReadLine());
  11.             double success = double.Parse(Console.ReadLine());
  12.             double rangeOfMinimalSalary = double.Parse(Console.ReadLine());
  13.            
  14.             double rangeOfSocialScolarship = rangeOfMinimalSalary * 35/100;
  15.             double rangeOfScolarshipforSuccess = 25 * success;
  16.            
  17.  
  18.  
  19.             if (success >= 5.5)
  20.             {
  21.                 if (rangeOfScolarshipforSuccess >= rangeOfSocialScolarship || incomes>rangeOfMinimalSalary)
  22.                 {
  23.                     Console.WriteLine($"You get a scholarship for excellent results {Math.Floor( rangeOfScolarshipforSuccess)} BGN");
  24.                 }
  25.                 else
  26.                 {
  27.                     Console.WriteLine($"You get a Social scholarship {Math.Floor( rangeOfSocialScolarship)} BGN");
  28.                 }
  29.             }
  30.             else if (incomes < rangeOfMinimalSalary && success > 4.5 )
  31.             {
  32.                 Console.WriteLine($"You get a Social scholarship {Math.Floor( rangeOfSocialScolarship)} BGN");
  33.             }
  34.            
  35.             else Console.WriteLine("You cannot get a scholarship!");
  36.         }
  37.     }
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement