Advertisement
Guest User

Untitled

a guest
Sep 15th, 2019
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.76 KB | None | 0 0
  1. using System;
  2.  
  3. namespace SchoolarShip
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             //input
  10.             double income = double.Parse(Console.ReadLine());
  11.             double averageGrade = double.Parse(Console.ReadLine());
  12.             double minimalWage = double.Parse(Console.ReadLine());
  13.  
  14.             double socialSchoolarship = Math.Floor(minimalWage * 0.35);
  15.             double exellentSchoolership = Math.Floor(averageGrade * 25);
  16.  
  17.             //if construction
  18.             if (income < minimalWage && averageGrade >= 5.50)
  19.             {
  20.                 if (socialSchoolarship > exellentSchoolership)
  21.                 {
  22.                     Console.WriteLine($"You get a Social scholarship {socialSchoolarship} BGN");
  23.                 }
  24.                 else if (exellentSchoolership > socialSchoolarship)
  25.                 {
  26.                     Console.WriteLine($"You get scholarship for excellent results {exellentSchoolership} BGN");
  27.                 }
  28.                 else if (socialSchoolarship == exellentSchoolership)
  29.                 {
  30.                     Console.WriteLine($"You get scholarship for excellent results {exellentSchoolership} BGN");
  31.                 }
  32.             }
  33.             else if (income < minimalWage && averageGrade > 4.50)
  34.             {
  35.                 Console.WriteLine($"You get a Social scholarship {socialSchoolarship} BGN");
  36.             }
  37.             else if (income >= minimalWage && averageGrade >= 5.50)
  38.             {
  39.                 Console.WriteLine($"You get scholarship for excellent results {exellentSchoolership} BGN");
  40.             }
  41.             else
  42.             {
  43.                 Console.WriteLine("You cannot get a scholarship!");
  44.             }
  45.         }
  46.  
  47.  
  48.  
  49.     }
  50. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement