1. Engineering
  2. Computer Science
  3. 5 write a function that implements multiplication of natural numbers...

Question: 5 write a function that implements multiplication of natural numbers...

Question details

5. Write a function that implements multiplication of natural numbers. The function signature should be function s where a, b, and s are digit arrays (like those returned by uint_to_digits). For example, multn [1 5], [8 2 3]) outputs multn(a, b) ans 1 2 3 45 Your function should only use the multiplication table for integers 0 through 9. You cannot simply do: s-uint to digits digits.to.uint(a) * digitsto_uint(b));

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution