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 earnings = double.Parse(Console.ReadLine());
- double success = double.Parse(Console.ReadLine());
- double minWage = double.Parse(Console.ReadLine());
- double scholarship = 0;
- string scholarshipType = "noScholarship";
- if(earnings <= minWage)
- {
- if(success >= 4.5)
- {
- scholarship = 0.35 * minWage;
- scholarshipType = "social";
- }
- }
- if(success >= 5.5)
- {
- if(25* success >= scholarship)
- {
- scholarship = 25 * success;
- scholarshipType = "success";
- }
- }
- if(scholarshipType == "social")
- {
- Console.WriteLine($"You get a Social scholarship {scholarship} BGN");
- }
- else if(scholarshipType == "success")
- {
- Console.WriteLine($"You get a scholarship for excellent results {scholarship} BGN");
- }
- else
- {
- Console.WriteLine("You cannot get a scholarship!");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement