Advertisement
Guest User

scholarship

a guest
Feb 20th, 2020
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.40 KB | None | 0 0
  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 Success = double.Parse(Console.ReadLine());
  11.             double Salary = double.Parse(Console.ReadLine());
  12.             double socialScholarship = Math.Round(Salary * 0.35);
  13.             double successScholarship = Math.Floor(Success * 25);
  14.             double scholarship = 0;
  15.             if (Income > Salary)
  16.             {
  17.                 Console.WriteLine("You cannot get a scholarship!");
  18.             }
  19.             if (Success < 4.50)
  20.             {
  21.                 Console.WriteLine("You cannot get a scholarship!");
  22.             }
  23.             //if (Income < Salary)
  24.             //{
  25.                 //scholarship = socialScholarship;
  26.                 //Console.WriteLine($"You get a Social scholarship {scholarship} BGN");
  27.             //}
  28.             if (socialScholarship > successScholarship)
  29.             {
  30.                 scholarship = socialScholarship;
  31.                 Console.WriteLine($"You get a Social scholarship {scholarship} BGN");
  32.             }
  33.             else if (Success > 5.50)
  34.             {
  35.                 scholarship = successScholarship;
  36.                 Console.WriteLine($"You get a scholarship for excellent results {scholarship:F2} BGN");
  37.             }
  38.  
  39.         }
  40.     }
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement