Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function money(income, averageSuccess, mrz) {
- income = +income;
- averageSuccess = +averageSuccess;
- mrz = +mrz;
- let dohodSocial = 0;
- let dohodSucces = 0;
- if (income < mrz && averageSuccess > 4.50) {
- dohodSocial = Math.floor(mrz * 0.35);
- }
- if (averageSuccess >= 5.50) {
- dohodSucces = Math.floor(averageSuccess * 0.25);
- }
- if (dohodSocial > dohodSucces && dohodSocial !==0 ) {
- console.log(`You get a Social scholarship ${dohodSocial} BGN`);
- } else if (dohodSucces >= dohodSocial && dohodSucces !==0) {
- console.log(`You get a scholarship for excellent results ${dohodSucces} BGN`);
- } else {
- console.log("You cannot get a scholarship!");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement