Advertisement
Guest User

08. Scholarship

a guest
May 2nd, 2019
189
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.  
  3. namespace _8_scholarshops
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.  
  10.             double income = double.Parse(Console.ReadLine());
  11.             double score = double.Parse(Console.ReadLine());
  12.             double minSalary = double.Parse(Console.ReadLine());
  13.  
  14.             double socialScholarship = 0.35 * minSalary;
  15.             double scoreScholarship = score * 25;
  16.  
  17.             if (income > minSalary || score < 4.5)
  18.  
  19.             {
  20.                 Console.WriteLine("You cannot get a scholarship!");
  21.             }
  22.  
  23.             else if (income < minSalary && score > 4.5 && score < 5.5)
  24.  
  25.             {
  26.                 Console.WriteLine($"You get a Social scholarship {Math.Round(socialScholarship)} BGN");
  27.             }
  28.  
  29.             else if (income > minSalary && score > 5.5)
  30.  
  31.             {
  32.                 Console.WriteLine($"You get a scholarship for excellent results {Math.Round(scoreScholarship)} BGN");
  33.             }
  34.  
  35.              if (income < minSalary && score > 5.5 && socialScholarship == scoreScholarship)
  36.             {
  37.                 Console.WriteLine($"You get a scholarship for excellent results {Math.Round(scoreScholarship)} BGN");
  38.             }
  39.             else if (income < minSalary && score > 5.5 && socialScholarship < scoreScholarship)
  40.             {
  41.                 Console.WriteLine($"You get a scholarship for excellent results {Math.Round(scoreScholarship)} BGN");
  42.             }
  43.                    
  44.                 else if (income < minSalary && score > 5.5 &&  socialScholarship > scoreScholarship)
  45.                     Console.WriteLine($"You get a Social scholarship {Math.Round(socialScholarship)} BGN");
  46.  
  47.      
  48.        
  49.  
  50.  
  51.  
  52.         }
  53.     }
  54. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement