Advertisement
Spocoman

Scholarship

Nov 27th, 2021 (edited)
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.13 KB | None | 0 0
  1. using System;
  2. namespace Scholarship
  3. {
  4.     class Program
  5.     {
  6.         static void Main(string[] args)
  7.         {
  8.             double income = double.Parse(Console.ReadLine());
  9.             double average = double.Parse(Console.ReadLine());
  10.             double salary = double.Parse(Console.ReadLine());
  11.             double excellent = Math.Floor(average * 25);
  12.             double social = Math.Floor(salary * 0.35);
  13.  
  14.             if (average >= 5.5)
  15.             {
  16.                 if (excellent >= social || income > salary)
  17.                 {
  18.                     Console.WriteLine($"You get a scholarship for excellent results { excellent} BGN");
  19.                 }
  20.                 else
  21.                 {
  22.                     Console.WriteLine($"You get a Social scholarship { social} BGN");
  23.                 }
  24.             }
  25.             else if (average > 4.5 && average < 5.5 && income < salary)
  26.             {
  27.                 Console.WriteLine($"You get a Social scholarship { social} BGN");
  28.             }
  29.             else
  30.             {
  31.                 Console.WriteLine("You cannot get a scholarship!");
  32.             }
  33.         }
  34.     }
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement