if true
f (a, b) = { 0, if a mod b = 0
{ b (a mod b), otherwise
end

 採用された回答

Birdman
Birdman 2018 年 1 月 16 日

0 投票

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

その他の回答 (0 件)

カテゴリ

タグ

質問済み:

2018 年 1 月 16 日

回答済み:

2018 年 1 月 16 日

Community Treasure Hunt

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

Start Hunting!

Translated by