Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function scholarship(input) {
- let income = Number(input.shift());
- let averageGrades = Number(input.shift());
- let minSalary = Number(input.shift());
- if (averageGrades >= 5.50) {
- console.log(`You get a scholarship for excellent results ${Math.abs(averageGrades*25)} BGN`);
- }else if (income < minSalary) {
- console.log(`You get a Social scholarship ${minSalary*0.35} BGN`)
- } else {
- console.log("You cannot get a scholarship!")
- } }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement