Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace Scholarship
- {
- class Program
- {
- static void Main(string[] args)
- {
- //Determine the variables to be entered by the user
- double salaryParent = double.Parse(Console.ReadLine());
- double mark = double.Parse(Console.ReadLine());
- double minSalary = double.Parse(Console.ReadLine());
- //Calculate the amount of socila and excellent scholarships
- double excellentScholarshipCoefficient = 25;
- double socialScholarship = Math.Floor(0.35 * minSalary);
- double excellentScholarship = Math.Floor(mark * excellentScholarshipCoefficient);
- if (mark >= 5.50)
- {
- if (excellentScholarship >= socialScholarship || salaryParent > minSalary)
- {
- Console.WriteLine($"You get a scholarship for excellent results {excellentScholarship} BGN");
- }
- else
- {
- Console.WriteLine($"You get a Social scholarship {socialScholarship} BGN");
- }
- }
- else if (salaryParent < minSalary && mark > 4.50)
- {
- Console.WriteLine($"You get a Social scholarship {socialScholarship} BGN");
- }
- else
- {
- Console.WriteLine("You cannot get a scholarship!");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement