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
6 odpowiedzi
+ 7
var monitors = computers*2;
console.log(monitors);
+ 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.
☺️
+ 1
Don't expect people to put effort into helping you if you're not even willing to put any effort into asking your question.
https://www.sololearn.com/Content-Creation-Guidelines?
https://code.sololearn.com/Wv5gTHy1N6Ji/?ref=app
https://www.sololearn.com/discuss/1316935/?ref=app
https://code.sololearn.com/W3uiji9X28C1/?ref=app
https://www.sololearn.com/discuss/333866/?ref=app
+ 1
var computers = parseInt(readLine(), 10)
//your code goes here
const numberOfMonitorPerComputer = 2;
const monitors = computers * numberOfMonitorPerComputer;
console.log(monitors);
+ 1
var computers = parseInt(readLine());
var monitor = computers*2;
console.log(monitor);
0
So basically you are just multiplying parseInt(readLine(), 10) * numberOfMonitorPerComputer