An Interest In:
Web News this Week
- April 19, 2024
- April 18, 2024
- April 17, 2024
- April 16, 2024
- April 15, 2024
- April 14, 2024
- April 13, 2024
July 11, 2022 11:13 am GMT
Original Link: https://dev.to/nombrekeff/challenge-multiply-2-numbers-without-operators-and-for-and-while-keywords-1e2c
[Challenge] Multiply 2 numbers without '-*/' operators and 'for' and 'while' keywords
Following on the previous challenge, I thought of doing a similar challenge but for multiplication.
Can you multiply 2 numbers without using the following operators and keywords?
Rules:
- Multiply a and b
- Don't use operators: +-*/
- Don't use keywords: for/while
Pseudocode:
a = 2b = 32multiply(a, b) => 64
Test:
multiply(a, b) == a * b
You can use any language you want, additionally you can add a note indicating which language it is, so people not familiar with the language can know!
That's all, have fun!!
My solution:
Original Link: https://dev.to/nombrekeff/challenge-multiply-2-numbers-without-operators-and-for-and-while-keywords-1e2c
Share this article:
Tweet
View Full Article
Dev To
An online community for sharing and discovering great ideas, having debates, and making friendsMore About this Source Visit Dev To