Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function squareArea(input){
- let income = Number(input[0])
- let avarageMarks = Number(input[1])
- let minSalary = Number(input[2])
- let socialMoney = Math.floor(0.35 * minSalary)
- let schooMoney = Math.floor(25 * avarageMarks)
- if(income < minSalary){
- if (avarageMarks >= 4.50 && avarageMarks < 5.50){
- console.log(`You get a Social scholarship ${socialMoney} BGN`)
- }else if(avarageMarks >= 4.50 && avarageMarks >= 5.50){
- if(socialMoney > schooMoney){
- console.log(`You get a Social scholarship ${socialMoney} BGN`)
- }else if(socialMoney <= schooMoney){
- console.log(`You get a scholarship for excellent results ${schooMoney} BGN`)
- }
- }else if(avarageMarks < 4.50){
- console.log(`You cannot get a scholarship!`)
- }
- }else if(income >= minSalary){
- if(avarageMarks >= 5.50){
- console.log(`You get a scholarship for excellent results ${schooMoney} BGN`)
- }else if(avarageMarks < 5.50){
- console.log(`You cannot get a scholarship!`)
- }
- }
- }
- squareArea(["480.00","4.60","450.00"]);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement