Advertisement
Guest User

levovoe

a guest
Jan 21st, 2020
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. function scholarship(input) {
  2. let income = Number(input.shift());
  3. let averageGrades = Number(input.shift());
  4. let minSalary = Number(input.shift());
  5. if (averageGrades >= 5.50) {
  6. console.log(`You get a scholarship for excellent results ${Math.abs(averageGrades*25)} BGN`);
  7. }else if (income < minSalary) {
  8. console.log(`You get a Social scholarship ${minSalary*0.35} BGN`)
  9. } else {
  10. console.log("You cannot get a scholarship!")
  11. } }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement