What is wrong with the code until the result? False؟ | Sololearn: Learn to code for FREE!

0

What is wrong with the code until the result? False؟

function main() { var oldPrice = parseInt(readLine(), 10) // your code goes here  console.log(oldPrice*0.20);

1/23/2022 1:07:45 PM

Zina Shekh Alzoor

13 Answers

New Answer

+3

You need to remove the space between the double quotes and Java in your second code. \"Java is...

+2

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?

+2

You should multiply your oldPrice variable by 0.80 to get the final amount. 0.20 just gives the discount amount.

+1

0

Thanks, I modified it

0

Please format it and describe what you want to do. } is missing

0

I want to solve a code in js course

0

Please , Why is it giving me the wrong result in this code too?

0

console.log('I\'m learning JavaScript'); console.log("A quote: \" Java is to JavaScript as ham is to hamster.\"");

0

Thanks👍👍

0

It also gives me an implementation error in the following code in solving the snail problem🥺

0

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) } }

0