Advertisement
ktopchiev

Scholarship

Nov 29th, 2017
838
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.78 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace Scholarship
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             double salary = double.Parse(Console.ReadLine());
  14.             double avgSucc = double.Parse(Console.ReadLine());
  15.             double minSalary = double.Parse(Console.ReadLine());
  16.             double socScholar = minSalary * 0.35;
  17.             double xlntSucc = avgSucc * 25;
  18.  
  19.             if (salary >= minSalary)
  20.             {
  21.                 if (avgSucc < 5.50)
  22.                 {
  23.                     Console.WriteLine("You cannot get a scholarship!");
  24.                 }
  25.                 else if (avgSucc >= 5.50)
  26.                 {
  27.                     Console.WriteLine("You get a scholarship for excellent results " + Math.Floor(xlntSucc) + " BGN");
  28.                 }
  29.             }
  30.             else if (salary < minSalary)
  31.             {
  32.                 if (avgSucc < 4.50)
  33.                 {
  34.                     Console.WriteLine("You cannot get a scholarship!");
  35.                 }
  36.                 else if (avgSucc > 4.50 && avgSucc < 5.50)
  37.                 {
  38.                     Console.WriteLine("You get a Social scholarship " + Math.Floor(socScholar) + " BGN");
  39.                 }
  40.                 else if (avgSucc >= 5.50 && xlntSucc >= socScholar)
  41.                 {
  42.                     Console.WriteLine("You get a scholarship for excellent results " + Math.Floor(xlntSucc) + " BGN");
  43.                 }
  44.                 else if (avgSucc >= 5.50 && xlntSucc < socScholar)
  45.                 {
  46.                     Console.WriteLine("You get a Social scholarship " + Math.Floor(socScholar) + " BGN");
  47.                 }
  48.             }
  49.         }
  50.     }
  51. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement