13 Answers
New Answerfunction main() { var oldPrice = parseInt(readLine(), 10) // your code goes here console.log(oldPrice*0.20);
1/23/2022 1:07:45 PM
Zina Shekh Alzoor13 Answers
New AnswerYou need to remove the space between the double quotes and Java in your second code. \"Java is...
Please do not put code in the heading – it gets CUT OFF and we can't see it. Rather put it in a script and link it. What are you trying to do with the code?
You should multiply your oldPrice variable by 0.80 to get the final amount. 0.20 just gives the discount amount.
console.log('I\'m learning JavaScript'); console.log("A quote: \" Java is to JavaScript as ham is to hamster.\"");
It also gives me an implementation error in the following code in solving the snail problem🥺
function main() { var depth = parseInt(readLine(), 10); //your code goes here var i=1; while (i<depth) { var x=7; var y=2; var z=x-y; var s=z+(7-2); console.log(s) } }
Sololearn Inc.
535 Mission Street, Suite 1591Send us a message