Cody

Problem 1435. Basics: Divide integers to get integer outputs in all cases

Solution 264490

Submitted on 20 Jun 2013 by Venu Lolla
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test Status Code Input and Output
1   Pass
%% a = [-2 2];b=3; y = [0 1]; assert(isequal(divide_differently(a,b),y))

ans = 0 1

2   Pass
%% a = [-5 0];b=3; y = [-1 0]; assert(isequal(divide_differently(a,b),y))

ans = -1 0

Suggested Problems

More from this Author10

Community Treasure Hunt

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

Start Hunting!