0

In the office, 2 monitors are connected to each computer. The first line of the given code takes the number of computers as inpu

How solve it in js

9th Oct 2021, 1:06 PM
Mohammad Imran
6 odpowiedzi
+ 7
var monitors = computers*2; console.log(monitors);
10th Jan 2022, 7:08 PM
Weronika Stępień
Weronika Stępień - avatar
+ 2
First of all it is not a complete question, and second you have to show us your attempt. We can help you with your code, but can't code for you. ☺️
9th Oct 2021, 1:43 PM
Rupali Haldiya
Rupali Haldiya - avatar
+ 1
var computers = parseInt(readLine(), 10) //your code goes here const numberOfMonitorPerComputer = 2; const monitors = computers * numberOfMonitorPerComputer; console.log(monitors);
9th Nov 2021, 11:10 AM
Chedrac GUEDENON
+ 1
var computers = parseInt(readLine()); var monitor = computers*2; console.log(monitor);
24th Oct 2022, 1:23 PM
Arpita Karmakar
Arpita Karmakar - avatar
0
So basically you are just multiplying parseInt(readLine(), 10) * numberOfMonitorPerComputer
22nd Aug 2022, 1:15 PM
Steve Nova
Steve Nova - avatar