Advertisement
Guest User

Untitled

a guest
Feb 21st, 2020
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 2.81 KB | None | 0 0
  1. using System;
  2.  
  3. namespace _08.Scholarship_SecondTry
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             double income = double.Parse(Console.ReadLine());
  10.             double grade = double.Parse(Console.ReadLine());
  11.             double minimalSalary = double.Parse(Console.ReadLine());
  12.  
  13.             double socialScholarship = 0.35 * minimalSalary;
  14.             double gradeScolarship = grade * 25;
  15.  
  16.  
  17.             if ((income < minimalSalary && grade >= 4.50) || (income < minimalSalary && grade >= 4.50 && socialScholarship > gradeScolarship))
  18.             {
  19.  
  20.                 Console.WriteLine($"You get a Social scholarship {Math.Floor(socialScholarship)} BGN");
  21.  
  22.             }
  23.  
  24.             else if (grade >= 5.50 || (grade >= 5.50 && socialScholarship <= gradeScolarship))
  25.             {
  26.                 Console.WriteLine($"You get a scholarship for excellent results {Math.Floor(socialScholarship)} BGN");
  27.             }
  28.  
  29.             else
  30.             {
  31.                 Console.WriteLine("You cannot get a scholarship!");
  32.             }
  33.  
  34.  
  35.  
  36.                 //if (income < minimalSalary && grade >= 4.5)
  37.                 //{
  38.                 //    Console.WriteLine($"You get a Social scholarship {Math.Floor(socialScholarship)} BGN");
  39.                 //}
  40.                 //else if (grade >= 5.5)
  41.                 //{
  42.                 //    Console.WriteLine($"You get a scholarship for excellent results {Math.Floor(gradeScolarship)} BGN");
  43.                 //}
  44.                 //else
  45.                 //{
  46.                 //    Console.WriteLine("You cannot get a scholarship!");
  47.                 //}
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.                 // if (income < minimalSalary && grade >= 5.50)
  58.                 // {
  59.                 //     if (gradeScolarship >= socialScholarship)
  60.                 //     {
  61.                 //         Console.WriteLine($"You get a scholarship for excellent results {Math.Floor(gradeScolarship)} BGN");
  62.                 //     }
  63.                 //     else if (socialScholarship > gradeScolarship)
  64.                 //     {
  65.                 //         Console.WriteLine($"You get a Social scholarship {Math.Floor(socialScholarship)} BGN");
  66.                 //     }
  67.                 // }
  68.  
  69.  
  70.                 //if (income < minimalSalary && grade >= 4.5)
  71.                 //{
  72.                 //    Console.WriteLine($"You get a Social scholarship {Math.Floor(socialScholarship)} BGN");
  73.                 // }
  74.                 // else if (grade >= 5.5)
  75.                 // {
  76.                 //     Console.WriteLine($"You get a scholarship for excellent results {Math.Floor(gradeScolarship)} BGN");
  77.                 //}
  78.                 // else
  79.                 // {
  80.                 //    Console.WriteLine("You cannot get a scholarship!");
  81.                 // }
  82.  
  83.         }
  84.     }
  85. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement