Practice 7.2 JavaScript | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 1

Practice 7.2 JavaScript

Can anyone help me with the solution to JavaScript practice 7.2? I canā€™t seem to get it

25th Dec 2021, 10:26 AM
Tobi Olanitori
4 Respostas
+ 3
Alex Huizar , what is your issue? is it the math part how to calculate it, or is it the coding part?
25th Dec 2021, 4:14 PM
Lothar
Lothar - avatar
+ 1
I figured it out already thanks. I assigned a value to the input and i shouldnt have
25th Dec 2021, 4:15 PM
Tobi Olanitori
+ 1
Finally figured it out but wont tell the answer do some research before you just look for the answer to copy.. (youll never learn just copying answers) I will leave a trail thoā€¦ monitors needs its own Varā€¦ then multiple the 2 vars; Then console.log() (The instructions are vague but the more you learn, the more you undersand the dialect)..
10th Jan 2022, 6:55 PM
David Haley
0
I do have a question about parseInt thoā€¦ parseInt(readLine(), 10) readLine converts a string to a integerā€¦ what string in the above code? And inputs of: 18, 20, 6 Represent different numbers of computers to be multiplied by 2ā€¦ Do the 18,20,6 replace the 10 in: parseInt(readLine(), 10)? If so, what happens if the number of computers is over 36? Given thats the highest number parseInt convertsā€¦ Im probably asking all the wrong wuestions but if someone can articulate this better, id really appriciate it..
10th Jan 2022, 7:52 PM
David Haley