Scholarship
Здравейте, имам проблем със задачата Scholarship. Judge ми дава 81/100, така изглежда кодът ми :
function school(input) {
let incomes = +input[0];
let averageSuccess = +input[1];
let minSalary = +input[2];
let socialSchoolarship = 0.35 * minSalary;
let schoolarship = averageSuccess * 25;
let canGetSocialSchoolarship = incomes < minSalary && averageSuccess > 4.50;
let canGetSchoolarship = averageSuccess >= 5.50;
if (!canGetSchoolarship && !canGetSocialSchoolarship) {
console.log('You cannot get a scholarship!');
} else if (canGetSchoolarship && schoolarship >= socialSchoolarship) {
console.log(`You get a scholarship for excellent results ${Math.floor(schoolarship)} BGN`);
} else if (canGetSocialSchoolarship && socialSchoolarship > schoolarship) {
console.log(`You get a Social scholarship ${Math.floor(socialSchoolarship)} BGN`);
}
}
Ще бъда благодарна, ако някой ми помогне. Благодаря!