SHARE
TWEET

scholarship2

a guest Apr 23rd, 2019 82 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System;
  2.  
  3. namespace Scholarshipp
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             double income = double.Parse(Console.ReadLine());
  10.             double averageGrade = double.Parse(Console.ReadLine());
  11.             double minimalSalary = double.Parse(Console.ReadLine());
  12.  
  13.             double socialStipendy = minimalSalary * 0.35;
  14.             double gradeStipendy = averageGrade * 25;
  15.             double result = 0;
  16.  
  17.             bool status = socialStipendy.Equals(gradeStipendy);
  18.  
  19.             if (income > minimalSalary && averageGrade <= 5.50)
  20.             {
  21.                 Console.WriteLine("You cannot get a scholarship!");
  22.  
  23.             }
  24.             else if (income < minimalSalary && averageGrade >= 5.50)
  25.             {
  26.  
  27.                 if (gradeStipendy > socialStipendy)
  28.                 {
  29.                     result = (Math.Floor(gradeStipendy));
  30.                     Console.WriteLine($"You get a scholarship for excellent results {result}");
  31.  
  32.                 }
  33.                 else
  34.                 {
  35.                     result = (Math.Floor(socialStipendy));
  36.                     Console.WriteLine($"You get a Social scholarship {result} BGN");
  37.  
  38.                 }
  39.  
  40.                 if (status)
  41.                 {
  42.                     result = (Math.Floor(gradeStipendy));
  43.                     Console.WriteLine($"You get a scholarship for excellent results {result}");
  44.  
  45.                 }
  46.  
  47.             }
  48.  
  49.             else if (income < minimalSalary && averageGrade <= 5.50)
  50.             {
  51.  
  52.  
  53.                 result = (Math.Floor(socialStipendy));
  54.                 Console.WriteLine($"You get a Social scholarship {result} BGN");
  55.             }
  56.             else if (income < minimalSalary && averageGrade >= 5.50)
  57.             {
  58.  
  59.                 result = (Math.Floor(gradeStipendy));
  60.                 Console.WriteLine($"You get a scholarship for excellent results {result}");
  61.  
  62.             }
  63.  
  64.             else if (income > minimalSalary && averageGrade >= 5.50)
  65.             {
  66.  
  67.                 result = (Math.Floor(gradeStipendy));
  68.                 Console.WriteLine($"You get a scholarship for excellent results {result}");
  69.  
  70.             }
  71.         }
  72.     }
  73. }
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