Advertisement
Guest User

Untitled

a guest
Feb 16th, 2020
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.54 KB | None | 0 0
  1. using System;
  2.  
  3. namespace _081
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             double incom = double.Parse(Console.ReadLine());
  10.             double averageResult = double.Parse(Console.ReadLine());
  11.             double minimalSalary = double.Parse(Console.ReadLine());
  12.  
  13.             if (incom < minimalSalary && averageResult > 4.50)
  14.             {
  15.                 double scholarshipValueS = minimalSalary * 0.35;
  16.                 Console.WriteLine($"You get a Social scholarship {scholarshipValueS} BGN");
  17.             }
  18.             else if (averageResult >= 5.5)
  19.             {                
  20.                 double scholarshipValueR = averageResult * 25;
  21.                 Console.WriteLine($"You get a scholarship for excellent results {scholarshipValueR} BGN");
  22.             }
  23.             else if (incom > minimalSalary)
  24.             {
  25.                 Console.WriteLine($"You cannot get a scholarship!");
  26.             }
  27.             else if (averageResult < 4.50)
  28.             {
  29.                 Console.WriteLine($"You cannot get a scholarship!");
  30.             }
  31.            
  32.             else if (minimalSalary * 0.35 > averageResult * 25)
  33.             {
  34.                 Console.WriteLine($"You get a Social scholarship {Math.Floor(minimalSalary * 0.35)} BGN");
  35.             }
  36.             else if (minimalSalary * 0.35 <= averageResult * 25)
  37.             {
  38.                 Console.WriteLine($"You get a scholarship for excellent results {Math.Floor(averageResult * 25)} BGN");
  39.             }
  40.  
  41.         }
  42.     }
  43. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement