0
Any examples please?âš
You are making a currency converter app. Create a function called convert, which takes two parameters: the amount to convert, and the rate, and returns the resulting amount. The code to take the parameters as input and call the function is already present in the Playground. Create the function to make the code work. Sample Input: 100 1.1 Sample Output: 110
11 Answers
+ 3
Multiply both parameters
+ 1
Ana Hoxha
Explanation is already given. Read again and solve problem. Don't ask for direct solution.
+ 1
Ana Hoxha Then first learn coding. This is just a simple program. In explanation already given you have to create a function to make code work.
+ 1
Ana Hoxha
Well done. Did you get output?
+ 1
monika Narendra Mahajan
Sir is not active now
0
First try then ask.
0
function main() {
var amount = parseFloat(readLine(), 10);
var rate = parseFloat(readLine(), 10);
console.log(convert(amount, rate));
}
0
Idk how to do the code im tryingâš
0
Ok ok i will try againđ
0
function main(){
var amount = parseFloat(readLine(), 10);
var rate = parseFloat(readLine(), 10);
console.log(convert(amount,rate))
}
function convert (amount,rate ){
return (amount*rate);
}
IS THIS OK?
0
hii sir I have one problem related to python example during practice session on solo learn