Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace Scholarship
- {
- class Program
- {
- static void Main(string[] args)
- {
- double income = double.Parse(Console.ReadLine());
- double gradeAvg = double.Parse(Console.ReadLine());
- double minSalary = double.Parse(Console.ReadLine());
- double socScholarship = 0;
- double gradeScholarship = 0;
- if (income < minSalary && gradeAvg > 4.5)
- {
- socScholarship = 0.35 * minSalary;
- }
- if (gradeAvg >= 5.5)
- {
- gradeScholarship = gradeAvg * 25;
- }
- if (socScholarship != 0 || gradeScholarship != 0)
- {
- if(gradeScholarship >= socScholarship)
- {
- Console.WriteLine($"You get a scholarship for excellent results {Math.Floor(gradeScholarship)} BGN");
- }
- else
- {
- Console.WriteLine($"You get a Social scholarship {Math.Floor(socScholarship)} BGN");
- }
- }
- else
- {
- Console.WriteLine("You cannot get a scholarship!");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement