Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function stipendii (input)
- {
- let dohod = Number(input.shift());
- let uspeh = Number(input.shift());
- let minimalna = Number(input.shift());
- let otlichnikStipendiq = uspeh*25;
- let socialnaStipendiq = minimalna*0.35;
- if (uspeh<4.5)
- {
- console.log(`You cannot get a scholarship!`)
- }
- else
- {
- if (uspeh>5.49)
- {
- if(otlichnikStipendiq>socialnaStipendiq)
- {
- console.log(`You get a scholarship for excellent results ${otlichnikStipendiq} BGN`);
- }
- else if(socialnaStipendiq>otlichnikStipendiq)
- {
- console.log(`You get a Social scholarship ${socialnaStipendiq} BGN`);
- }
- }
- else
- {
- if(dohod<minimalna)
- {
- if(otlichnikStipendiq>socialnaStipendiq)
- {
- console.log(`You get a Social scholarship ${otlichnikStipendiq} BGN`);
- }
- else
- {
- console.log(`You get a Social scholarship ${socialnaStipendiq} BGN`);
- }
- }
- else
- {
- console.log(`You cannot get a scholarship!`)
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement