Advertisement
Guest User

Untitled

a guest
Oct 21st, 2019
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. function solve(input) {
  2. let dohodLV = Number(input.shift());
  3. let sredenUspeh = Number(input.shift());
  4. let minWage = Number(input.shift());
  5.  
  6. let stipendiq1 = 0.35 * minWage;
  7. let stipendiq2 = sredenUspeh * 25;
  8.  
  9. if (sredenUspeh < 4.5 || dohodLV > minWage){
  10. console.log("You cannot get a scholarship!")
  11. }
  12. if (sredenUspeh >= 4.5 && dohodLV < minWage && stipendiq1 > stipendiq2){
  13. console.log(`You get a Social scholarship ${stipendiq1} BGN`)
  14. if (sredenUspeh >= 5.5 && dohodLV < minWage && stipendiq2 > stipendiq1){
  15. console.log(`You get a scholarship for excellent results ${stipendiq2} BGN`)
  16. }
  17. }
  18. if (sredenUspeh >= 5.5 && dohodLV < minWage && stipendiq2 > stipendiq1){
  19. console.log(`You get a scholarship for excellent results ${stipendiq2} BGN`)
  20. }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement