Advertisement
DenislavZlatanov

Scholarship

May 22nd, 2019
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 2.48 KB | None | 0 0
  1. using System;
  2.  
  3. namespace Scholarships
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             double income = double.Parse(Console.ReadLine());
  10.             double averageSuccess = double.Parse(Console.ReadLine());
  11.             double minSalary = double.Parse(Console.ReadLine());
  12.  
  13.             double socialScholarship = minSalary * 0.35;
  14.             double excellentGradesScholarship = averageSuccess * 25;
  15.  
  16.             if (averageSuccess <= 4.50)
  17.             {
  18.                 Console.WriteLine($"You cannot get a scholarship!");
  19.             }
  20.             else if (averageSuccess > 4.50 && averageSuccess < 5.50)
  21.             {
  22.                 if (income > minSalary)
  23.                 {
  24.                     Console.WriteLine($"You cannot get a scholarship!");
  25.                 }
  26.                 else if (income < minSalary)
  27.                 {
  28.                     Console.WriteLine($"You get a Social scholarship {Math.Floor(socialScholarship)} BGN");
  29.                 }
  30.                
  31.             }
  32.             else if (averageSuccess >= 5.50 && income < minSalary)
  33.             {
  34.                 if (excellentGradesScholarship > socialScholarship)
  35.                 {
  36.                     Console.WriteLine($"You get a scholarship for excellent results {Math.Floor(excellentGradesScholarship)} BGN ");
  37.                 }
  38.                 else if (socialScholarship > excellentGradesScholarship)
  39.                 {
  40.                     Console.WriteLine($"You get a Social scholarship {Math.Floor(socialScholarship)} BGN");
  41.                 }
  42.                 else if (socialScholarship == excellentGradesScholarship)
  43.                 {
  44.                     Console.WriteLine($"You get a scholarship for excellent results {Math.Floor(excellentGradesScholarship)} BGN ");
  45.                 }
  46.             }
  47.             else if (averageSuccess >= 5.50)
  48.             {
  49.                 if (income < minSalary)
  50.                 {
  51.                     Console.WriteLine($"You get a Social scholarship {Math.Floor(socialScholarship)} BGN");
  52.                 }
  53.                 else if (income > minSalary)
  54.                 {
  55.                     Console.WriteLine($"You get a scholarship for excellent results {Math.Floor(excellentGradesScholarship)} BGN ");
  56.                 }
  57.             }
  58.             else
  59.             {
  60.                 Console.WriteLine($"You cannot get a scholarship!");
  61.             }
  62.          
  63.            
  64.            
  65.            
  66.  
  67.  
  68.         }
  69.     }
  70. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement