+ 6

Hi, Why 1.2practice(JavaSc) is not marked

with green tick as successfull? It's named "Big Sale"? There are 3 test cases. If one of them becomes green tick the others become ×(wrong). So they three must have been with green tick simolteneously (at the same time) may be. Could You tell me please step by step what I have to do? https://code.sololearn.com/W6lOlY08Gtp7/?ref=app

22nd Jan 2021, 1:32 PM
Egor Tonchev(EGO)
Egor Tonchev(EGO) - avatar
12 Antworten
+ 7
The problem is solved!!! ☺️Special Thanks to You, RKK
22nd Jan 2021, 3:26 PM
Egor Tonchev(EGO)
Egor Tonchev(EGO) - avatar
+ 5
This is a practice from SOLOLEARN PRO Java Script.
22nd Jan 2021, 2:41 PM
Egor Tonchev(EGO)
Egor Tonchev(EGO) - avatar
+ 5
No. If I asign different value s to var oldPrice this code has been correct becomes wrong and that code has been wrong becomes correct. BUT all the three tests never are correct.
22nd Jan 2021, 2:53 PM
Egor Tonchev(EGO)
Egor Tonchev(EGO) - avatar
+ 5
150 and 1500
22nd Jan 2021, 2:59 PM
Egor Tonchev(EGO)
Egor Tonchev(EGO) - avatar
+ 5
Yes, but then input value 100 becomes wrong output. May be "try again" button and save I'm doing something wrong.
22nd Jan 2021, 3:12 PM
Egor Tonchev(EGO)
Egor Tonchev(EGO) - avatar
+ 2
it's working fine. is this a challenge for us?
22nd Jan 2021, 2:32 PM
minirkk
minirkk - avatar
+ 2
okay did it passed all the test cases?
22nd Jan 2021, 2:42 PM
minirkk
minirkk - avatar
+ 2
okay i see for which input value its showing wrong output.
22nd Jan 2021, 2:55 PM
minirkk
minirkk - avatar
+ 2
Good to know, and congrats! 👏🎉😁
22nd Jan 2021, 3:27 PM
minirkk
minirkk - avatar
+ 1
Your code is perfect it's giving me 120 for 150 and 1200 for 1500 which is correct.
22nd Jan 2021, 3:05 PM
minirkk
minirkk - avatar
+ 1
EGO use this line var oldPrice = parseInt(readLine(), 10); instead of var oldPrice = 100; And try running again.
22nd Jan 2021, 3:14 PM
minirkk
minirkk - avatar
0
EGO copy and paste this code once... function main() { var oldPrice = parseInt(readLine(), 10); // your code goes here var z = oldPrice-oldPrice*(20/100); console.log(z); }
22nd Jan 2021, 3:11 PM
minirkk
minirkk - avatar