Advertisement
silen04

Schoolarship

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