+ 2

what wiil be code or solution for cthis question

In the office, 2 monitors are connected to each computer. The first line of the given code takes the number of computers as input. Task Complete the code to calculate and output the number of monitors to the console. Sample Input 10 Sample Output 20 Hint Since each computer has 2 monitors, simply multiply the count of the computers by 2. Use the multiplication operator (*).

28th Oct 2021, 5:04 AM
Rohit Pal
15 Antworten
+ 4
Also have problem with this Finally solved it :) var computers = parseInt(readLine(), 10) var monitors = 2; var monitors = (computers*monitors); console.log(monitors);
2nd Nov 2021, 1:41 PM
Peter
+ 3
Can you show us your code please? Ideally by posting it in the sololearn code playground and then providing a link. That way people can take a look and find out what is going on.
28th Oct 2021, 6:18 AM
Simon Sauter
Simon Sauter - avatar
+ 2
1. All you have to do is multiply the input by two and output the result. 2. Please always tag the language you're asking about. https://code.sololearn.com/W3uiji9X28C1/?ref=app
28th Oct 2021, 6:14 AM
Simon Sauter
Simon Sauter - avatar
+ 2
var computers = parseInt(readLine(), 10) //your code goes here var monitors = computers*2 console.log(monitors);
15th Nov 2022, 10:48 AM
Ionut Laurian Iscru
Ionut Laurian Iscru - avatar
+ 1
What's up with this var computers = parseInt(readLine(), 10) business? Why not just var computers = 10;
18th Nov 2021, 10:49 AM
Rapha
+ 1
var computers = parseInt(readLine(), 10) //your code goes here var monitors = 2; var monitors = (computers*monitors); console.log(monitors);
18th Feb 2022, 2:57 PM
Bonazebi Arthuz
0
It's not working
28th Oct 2021, 5:37 AM
Rohit Pal
0
The code which is given var computers = parseInt(readline(), 10)
28th Oct 2021, 5:39 AM
Rohit Pal
0
Language Java script But the output is 36 And we will 10 ×2 the output is 20 only
28th Oct 2021, 6:16 AM
Rohit Pal
28th Oct 2021, 6:23 AM
Rohit Pal
0
He doesnt even know what his own problem is @Peter, no point in giving him answers when he wont even make an attempt
2nd Nov 2021, 2:01 PM
Jibraeel Abdelwahhab
Jibraeel Abdelwahhab - avatar
0
// your code goes here var monitors = 2; var monitors = (computers*monitors); console.log(monitors);
16th Nov 2022, 5:19 AM
Pooja Patel
Pooja Patel - avatar
0
Thanks for the correct answer @Ionut
11th Mar 2023, 2:32 PM
sansanne mango
sansanne mango - avatar
- 1
print(n*2)
28th Oct 2021, 5:29 AM
Jibraeel Abdelwahhab
Jibraeel Abdelwahhab - avatar
- 1
For the code
28th Oct 2021, 6:23 AM
Rohit Pal