Advertisement
Guest User

Stipendiq

a guest
Oct 19th, 2019
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.60 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 Stipendiq
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             double dohod = double.Parse(Console.ReadLine());
  14.             double uspeh = double.Parse(Console.ReadLine());
  15.             double minZaplata = double.Parse(Console.ReadLine());
  16.             double socStipendia = minZaplata * 0.35;
  17.             double otlStipendia = uspeh * 25;
  18.            
  19.  
  20.             if (dohod > minZaplata && uspeh < 5.50)
  21.             {
  22.                 Console.WriteLine("You cannot get a scholarship!");
  23.             }
  24.  
  25.             else if (dohod < minZaplata)
  26.             {
  27.                 double socStipendiq = Math.Floor(minZaplata * 0.35);
  28.                 Console.WriteLine($"You get a Social scholarship {socStipendiq} BGN");
  29.             }
  30.  
  31.             else if (uspeh >= 5.50)
  32.             {
  33.                 double otlStipendiq = Math.Floor(uspeh * 25);
  34.                 Console.WriteLine($"You get a scholarship for excellent results {otlStipendiq} BGN");
  35.             }
  36.  
  37.             else if (socStipendia > otlStipendia)
  38.             {
  39.                 double socStipendiq = Math.Floor(minZaplata * 0.35);
  40.                 Console.WriteLine($"You get a Social scholarship {socStipendiq} BGN");
  41.             }
  42.  
  43.             else if (socStipendia < otlStipendia)
  44.                        
  45.             {
  46.                 Console.WriteLine($"You get a scholarship for excellent results {Math.Floor(otlStipendia)} BGN");
  47.             }
  48.         }
  49.     }
  50. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement