SHARE
TWEET

ScholarshipSolution

DenislavZlatanov May 23rd, 2019 101 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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.                
  33.             }
  34.             else if (averageSuccess >= 5.50 && income < minSalary)
  35.             {
  36.                 if (excellentGradesScholarship > socialScholarship)
  37.                 {
  38.                     Console.WriteLine($"You get a scholarship for excellent results {Math.Floor(excellentGradesScholarship)} BGN ");
  39.                 }
  40.                 else if (socialScholarship > excellentGradesScholarship)
  41.                 {
  42.                     Console.WriteLine($"You get a Social scholarship {Math.Floor(socialScholarship)} BGN");
  43.                 }
  44.                 else if (socialScholarship == excellentGradesScholarship)
  45.                 {
  46.                     Console.WriteLine($"You get a scholarship for excellent results {Math.Floor(excellentGradesScholarship)} BGN ");
  47.                 }
  48.             }
  49.             else if (averageSuccess >= 5.50)
  50.             {
  51.                 if (income < minSalary)
  52.                 {
  53.                     Console.WriteLine($"You get a Social scholarship {Math.Floor(socialScholarship)} BGN");
  54.                 }
  55.                 else if (income > minSalary)
  56.                 {
  57.                     Console.WriteLine($"You get a scholarship for excellent results {Math.Floor(excellentGradesScholarship)} BGN ");
  58.                 }
  59.                 else
  60.                 {
  61.                     Console.WriteLine($"You get a scholarship for excellent results {Math.Floor(excellentGradesScholarship)} BGN ");
  62.                 }
  63.             }
  64.             else
  65.             {
  66.                 Console.WriteLine($"You cannot get a scholarship!");
  67.             }
  68.          
  69.            
  70.            
  71.            
  72.  
  73.  
  74.         }
  75.     }
  76. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top