[Programming basics] - Scholarship - Javascript
здравейте,
относно задачата за стипендиите кодът, който яспах да напиша е следния
function Scholarship(input) {
let income = Number(input.shift());
let evaluation = Number(input.shift());
let minSalary = Number(input.shift());
let socialScholarship = 0;
socialScholarship = 0.35 * minSalary;
let achievementScholarship = Math.floor(evaluation * 25);
if (income > minSalary) {
console.log(`You cannot get a scholarship!`)
} else if (income < minSalary && evaluation > 4.50) {
if (socialScholarship > achievementScholarship){
console.log(`You get a Social scholarship ${socialScholarship} BGN`)
}
}else {
if ( achievementScholarship >=socialScholarship){
console.log(`You get a scholarship for excellent results ${achievementScholarship} BGN`)
}
}}
по зададените тестове ми се получава първият пример и Judje ми дава 62/100.
може ли малко помощ