Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
July 11, 2022 11:13 am GMT

[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:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To