Advertisement
Niicksana

Scholarship

Dec 13th, 2017
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.73 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 _2.Scholarship
  8. {
  9.     class Scholarship
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             // Exam - 03 September 2017
  14.             double income = double.Parse(Console.ReadLine());
  15.             double mark = double.Parse(Console.ReadLine());
  16.             double minPay = double.Parse(Console.ReadLine());
  17.  
  18.             double schoolership = 0;
  19.             double socialSchoolership = 0;
  20.             if (mark > 4.50 && mark < 5.50)
  21.             {
  22.                 if (income < minPay)
  23.                 {
  24.                     socialSchoolership = minPay * 0.35;
  25.                     Console.WriteLine("You get a Social scholarship {0} BGN", Math.Floor(socialSchoolership));
  26.                 }
  27.  
  28.                 else
  29.                 {
  30.                     Console.WriteLine("You cannot get a scholarship!");
  31.                 }
  32.             }
  33.  
  34.             else if (mark >= 5.50)
  35.             {
  36.                 schoolership = mark * 25;
  37.                 if (income < minPay)
  38.                 {
  39.                     socialSchoolership = minPay * 0.35;
  40.                 }
  41.  
  42.                 if (socialSchoolership > schoolership)
  43.                 {
  44.                     Console.WriteLine("You get a Social scholarship {0} BGN", Math.Ceiling(socialSchoolership));
  45.                 }
  46.  
  47.                 else
  48.                 {
  49.                     Console.WriteLine("You get a scholarship for excellent results {0} BGN", Math.Floor(schoolership));
  50.                 }
  51.             }
  52.  
  53.             else
  54.             {
  55.                 Console.WriteLine("You cannot get a scholarship!");
  56.             }
  57.         }
  58.     }
  59. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement