How to add? - MATLAB Cody - MATLAB Central

Problem 563. How to add?

Difficulty:Rate
  • Imagine you are in 2222 Anno Domini, when everyone must learn how to add,
  • and competing for the highly prestigious post of,
  • Chief Comptroller of Dda Corporation.
  • You are being tested via MATLAB Cody for addition of two positive integers X and Y,
  • both are fortunately in decimal system, and only a few dozen digits or less,
  • and delivered as ASCII strings.
  • Please output the result Z in similar style.
  • Please adopt a general strategy, as X and Y may be changed later.
  • Please rename the function Z = dda(X,Y).
  • Function Template:
function Z = dda(X,Y)
   X='98765432109876543210987654321098765432109876543210987654321'
   Y='98765432109876543210987654321098765432109876543210987654321'
   Z='197530864219753086421975308642197530864219753086421975308642';
end

Solution Stats

23.95% Correct | 76.05% Incorrect
Last Solution submitted on Feb 25, 2025

Problem Comments

Solution Comments

Show comments

Group

Number theory Image
Number theory
  • 44 Problems
  • 21 Finishers

Problem Recent Solvers147

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Go to top of page