Practice 7.2 JavaScript | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 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 Answers
+ 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