Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function solve(input) {
- let dohodLV = Number(input.shift());
- let sredenUspeh = Number(input.shift());
- let minWage = Number(input.shift());
- let stipendiq1 = 0.35 * minWage;
- let stipendiq2 = sredenUspeh * 25;
- if (sredenUspeh < 4.5 || dohodLV > minWage){
- console.log("You cannot get a scholarship!")
- }
- if (sredenUspeh >= 4.5 && dohodLV < minWage && stipendiq1 > stipendiq2){
- console.log(`You get a Social scholarship ${stipendiq1} BGN`)
- if (sredenUspeh >= 5.5 && dohodLV < minWage && stipendiq2 > stipendiq1){
- console.log(`You get a scholarship for excellent results ${stipendiq2} BGN`)
- }
- }
- if (sredenUspeh >= 5.5 && dohodLV < minWage && stipendiq2 > stipendiq1){
- console.log(`You get a scholarship for excellent results ${stipendiq2} BGN`)
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement