Subtract two positive numbers - MATLAB Cody - MATLAB Central

Problem 1058. Subtract two positive numbers

Difficulty:Rate

Given a and b as a string, return b-a without using string to number conversion functions. a and b must to be a same size and b > a.

a = '0125'

b = '1125'

y = 1000

Solution Stats

33.64% Correct | 66.36% Incorrect
Last Solution submitted on May 06, 2025

Problem Comments

Solution Comments

Show comments
LLMs with MATLAB updated to support the latest OpenAI Models
Large Languge model with MATLAB, a free add-on that lets you access...
1
3

Problem Recent Solvers88

Suggested Problems

More from this Author1

Problem Tags

Community Treasure Hunt

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

Start Hunting!
Go to top of page