Advertisement
miroslavpetrov96

Schoolarship

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