Clear Filters
Clear Filters

how can i write code on this?

3 views (last 30 days)
PLACEIUS NISHIGA G
PLACEIUS NISHIGA G on 16 Jan 2018
Answered: Birdman on 16 Jan 2018
if true
f (a, b) = { 0, if a mod b = 0
{ b (a mod b), otherwise
end

Accepted Answer

Birdman
Birdman on 16 Jan 2018
a=input('Enter a\n');
b=input('Enter b\n');
if ~mod(a,b)
y=0
else
y=b-mod(a,b)
end

More Answers (0)

Categories

Find more on Get Started with MATLAB in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!