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)
- {
- double income = double.Parse(Console.ReadLine());
- double avgGrade = double.Parse(Console.ReadLine());
- double minSalary = double.Parse(Console.ReadLine());
- double socialScholarship = Math.Floor(minSalary * 0.35);
- double gradeScholarchip = Math.Floor(avgGrade * 25);
- string result = "";
- if (avgGrade >= 5.5 && income <= minSalary && gradeScholarchip >= socialScholarship)
- {
- result = $"You get a scholarship for excellent results {gradeScholarchip} BGN";
- }
- else if (avgGrade >= 5.5 && income <= minSalary && gradeScholarchip <= socialScholarship)
- {
- result = $"You get a Social scholarship {socialScholarship} BGN";
- }
- else if (avgGrade >= 5.5 && income >= minSalary)
- {
- result = $"You get a scholarship for excellent results {gradeScholarchip} BGN";
- }
- else if (avgGrade >= 4.5 && income < minSalary)
- {
- result = $"You get a Social scholarship {socialScholarship} BGN";
- }
- else
- {
- result = "You cannot get a scholarship!";
- }
- Console.WriteLine(result);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement