Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function multiplay(input){
- let command = Number(input.shift());
- let sum = 0;
- while(true){
- if(command < 0){
- console.log("Negative number!");
- break;
- }
- sum = command * 2;
- console.log(sum.toFixed(2));
- command = input.shift();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement