SHARE
TWEET

Untitled

a guest Oct 21st, 2019 86 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
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
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top