Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi test

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB today!

Problem 1274. Accurate Division

Created by Khaled Hamed

Given three integers x, y and d, return x/y (as a string) to d significant digits. Remove leading and trailing zeros.


x = 11; y = 7; d = 10;

z = adiv(x,y,d)



Problem Group

Solution Statistics

15 correct solutions 30 incorrect solutions
Last solution submitted on Jan 25, 2015