Advertisement
Guest User

Untitled

a guest
Nov 20th, 2019
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.31 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace Demo
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.  
  14.             double profit = Double.Parse(Console.ReadLine());
  15.             double grade = Double.Parse(Console.ReadLine());
  16.             double minIncome = Double.Parse(Console.ReadLine());
  17.  
  18.             double socialScholarship = 0;
  19.             double aScholarship = 0;
  20.  
  21.             if (profit < minIncome && grade > 4.50)
  22.             {
  23.                 socialScholarship = minIncome * 0.35;
  24.             }
  25.             if (grade >= 5.50)
  26.             {
  27.                 aScholarship = grade * 25;
  28.             }
  29.  
  30.  
  31.             if (socialScholarship > aScholarship && socialScholarship != 0)
  32.             {
  33.                 Console.WriteLine("You get a Social scholarship " + (int)Math.Floor(socialScholarship) + " BGN");
  34.             }
  35.             else if (aScholarship > socialScholarship && aScholarship != 0)
  36.             {
  37.                 Console.WriteLine("You get a scholarship for excellent results " + (int)Math.Floor(aScholarship) + " BGN");
  38.             }
  39.             else
  40.             {
  41.                 Console.WriteLine("You cannot get a scholarship!");
  42.  
  43.             }
  44.         }
  45.     }
  46. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement