0

Where is my mistake?

function scholarship(income, grade, salary){ income =Number(income); grade = Number(grade); salary = Number(salary); let social = 0; let exelentGrade = 0; if ( income < salary && grade > 4.5){ social = salary * 0.35; } if (grade >= 5.5){ exelentGrade = grade * 25; }else{ console.log("You cannot get a scholarship!"); } if(social>exelentGrade){ console.log(`You get a Social scholarship ${Math.floor(social)} BGN`); } if(social<exelentGrade){ console.log(`You get a scholarship for excellent results ${Math.floor(exelentGrade)} BGN`); } } scholarship("480.00", "4.60", "450.00");

20th Jun 2020, 11:23 AM
Savina Gyoshkova
Savina Gyoshkova - avatar
2 odpowiedzi
+ 1
Works fine according to inputs , what are your expected inputs and outputs tho?
20th Jun 2020, 11:27 AM
Abhay
Abhay - avatar
0
We have a Judge sistem and it's giving me 75/100
20th Jun 2020, 12:13 PM
Savina Gyoshkova
Savina Gyoshkova - avatar