SHARE
TWEET

Untitled

a guest Feb 21st, 2020 78 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function scholarship (input)
  2. {
  3. let income = Number(input.shift());
  4. let average = Number(input.shift());
  5. let minProfit = Number(input.shift());
  6.  
  7. let money = Math.floor(minProfit*0.35);
  8. let money2 = Math.floor(average*25);
  9.  
  10. if (income > minProfit && average < 5.50)
  11. {console.log("You cannot get a scholarship!");}
  12.  
  13.  else if (average >= 5.50 && money2>=money)
  14. {console.log(`You get a scholarship for excellent results ${money2} BGN`);}
  15.  
  16. else if (average >= 4.50)
  17. {console.log(`You get a Social scholarship ${money} BGN`); }
  18.  
  19. }
  20.  
  21. scholarship([480.00,
  22.     4.60,
  23.     450.00
  24.    
  25.    
  26.     ])
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top