Advertisement
Guest User

Untitled

a guest
Sep 20th, 2019
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.73 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 УПРАЖНЕНИЕ_УСЛОВНИ_КОНСТРУКЦИИ
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             //3:f2=>3.00
  14.             //3:d2=>0.03
  15.  
  16.             double incomeLv = double.Parse(Console.ReadLine());
  17.             double grade = double.Parse(Console.ReadLine());
  18.             double minIncomeLv = double.Parse(Console.ReadLine());
  19.  
  20.             double socialScolarship = Math.Floor(minIncomeLv * 0.35);
  21.             double gradeScolarship = Math.Floor(grade * 25);
  22.  
  23.             if ((incomeLv >= minIncomeLv && grade < 5.50) || (incomeLv <= minIncomeLv && grade < 4.50))
  24.             {
  25.                 Console.WriteLine("You cannot get a scholarship!");
  26.             }
  27.             else if (incomeLv <= minIncomeLv && (grade < 5.50 && grade >= 4.50))
  28.             {
  29.  
  30.                 Console.WriteLine($"You get a Social scholarship {socialScolarship} BGN");
  31.             }
  32.             else if (grade >= 5.50)
  33.             {
  34.  
  35.                 Console.WriteLine($"You get a scholarship for excellent results {gradeScolarship} BGN");
  36.             }
  37.             else if (incomeLv <= minIncomeLv && grade >= 5.50)
  38.             {
  39.                 if (gradeScolarship > socialScolarship)
  40.                 {
  41.                     Console.WriteLine($"You get a scholarship for excellent results {gradeScolarship} BGN");
  42.  
  43.                 }
  44.                 else if (socialScolarship > gradeScolarship)
  45.                 {
  46.                     Console.WriteLine($"You get a Social scholarship {socialScolarship} BGN");
  47.                 }
  48.  
  49.             }
  50.  
  51.         }
  52.     }
  53. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement