0

Please help me solve problem

Jack decided to save 15% on every paycheck. This program takes the amount of the salary as input. End the function to calculate and output the accumulated sum. Sample input 200 Result example 30 //node.js: function main() { var salaryAmount = parseInt(readLine(), 10); // end calling function getSavings(); } //end function function getSavings() { }; https://code.sololearn.com/cOw7kP35Nd6u/?ref=app

5th Dec 2020, 3:11 AM
Maxxxxx
Maxxxxx - avatar
4 Réponses
+ 1
console.log(salaryAmount * .15) put this at the end calling function. Leave //end function alone.
5th Dec 2020, 9:10 PM
Emmanuel Riano
Emmanuel Riano - avatar
+ 6
You haven't passed the salary amount in function!!
5th Dec 2020, 5:59 AM
Piyush
Piyush - avatar
+ 3
Dmitriy Plotnikov I think it's very simple. Just pass the salaryAmount in function and calculate 15% of salaryAmount.
5th Dec 2020, 5:39 AM
A͢J
A͢J - avatar
+ 2
function main() { var salaryAmount = parseInt(readLine(), 10); // завершите вызов функции getSavings(salaryAmount ); } //завершите функцию function getSavings(salaryAmount ) { console.log(salaryAmount / 100 * 15) };
6th Dec 2020, 11:58 AM
Maxxxxx
Maxxxxx - avatar