Advertisement
Prodanoff

SocialBatkoooouUuuu

Feb 13th, 2020
246
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function stipendii (input)
  2. {
  3.     let dohod = Number(input.shift());
  4.     let uspeh = Number(input.shift());
  5.     let minimalna = Number(input.shift());
  6.     let otlichnikStipendiq = uspeh*25;
  7.     let socialnaStipendiq = minimalna*0.35;
  8.    
  9.    
  10. if (uspeh<4.5)
  11. {
  12.     console.log(`You cannot get a scholarship!`)
  13. }
  14. else
  15. {
  16.     if (uspeh>5.49)
  17.     {
  18.         if(otlichnikStipendiq>socialnaStipendiq)
  19.         {
  20.             console.log(`You get a scholarship for excellent results ${otlichnikStipendiq} BGN`);
  21.         }
  22.         else if(socialnaStipendiq>otlichnikStipendiq)
  23.         {
  24.             console.log(`You get a Social scholarship ${socialnaStipendiq} BGN`);
  25.         }
  26.     }
  27.     else  
  28.     {
  29.         if(dohod<minimalna)
  30.         {
  31.            
  32.             if(otlichnikStipendiq>socialnaStipendiq)
  33.             {
  34.                 console.log(`You get a Social scholarship ${otlichnikStipendiq} BGN`);
  35.             }
  36.             else
  37.             {
  38.                 console.log(`You get a Social scholarship ${socialnaStipendiq} BGN`);
  39.             }
  40.         }
  41.         else
  42.         {
  43.             console.log(`You cannot get a scholarship!`)
  44.         }
  45.     }
  46. }
  47. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement