Advertisement
silvana1303

scholarship

Mar 20th, 2020
204
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 2.23 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 _02.Scholarship
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             var studentIncome = double.Parse(Console.ReadLine());
  14.             var studentGrade = double.Parse(Console.ReadLine());
  15.             var minimalCheck = double.Parse(Console.ReadLine());
  16.  
  17.             var poorScolarship = minimalCheck - (minimalCheck * 0.65);
  18.             var gradeScolarship = studentGrade * 25;
  19.  
  20.             if (studentIncome < minimalCheck && studentGrade < 4.5)
  21.             {
  22.                 Console.WriteLine("You cannot get a scholarship!");
  23.             }
  24.             else if(studentIncome > minimalCheck && studentGrade < 4.5)
  25.             {
  26.                 Console.WriteLine("You cannot get a scholarship!");
  27.             }
  28.             else if (studentIncome > minimalCheck && studentGrade >= 4.5 && studentGrade < 5.5)
  29.             {
  30.                 Console.WriteLine("You cannot get a scholarship!");
  31.             }
  32.             else if (studentIncome < minimalCheck && studentGrade >= 4.5 && studentGrade < 5.5)
  33.             {
  34.                 Console.WriteLine("You get a Social scholarship {0} BGN", Math.Floor(poorScolarship));
  35.             }
  36.             else if (studentIncome >= minimalCheck && studentGrade >= 5.5)
  37.             {
  38.                 Console.WriteLine("You get a scholarship for excellent results {0} BGN", Math.Floor(gradeScolarship));
  39.             }
  40.             else if (studentIncome < minimalCheck && studentGrade >= 5.5)
  41.             {
  42.                 if (poorScolarship > gradeScolarship)
  43.                 {
  44.                     Console.WriteLine("You get a Social scholarship {0} BGN", Math.Floor(poorScolarship));
  45.                 }
  46.                 else if (poorScolarship < gradeScolarship)
  47.                 {
  48.                     Console.WriteLine("You get a scholarship for excellent results {0} BGN", Math.Floor(gradeScolarship));
  49.                 }
  50.                 else
  51.                 {
  52.                     Console.WriteLine("You get a scholarship for excellent results {0} BGN", Math.Floor(gradeScolarship));
  53.                 }
  54.  
  55.             }
  56.         }
  57.     }
  58. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement