T
T
Tatyana2014-02-27 09:50:22
Informatics
Tatyana, 2014-02-27 09:50:22

How to fix or redo a program in matlab?

Determine if it is true that when a non-negative number a is divided by a
positive integer b, the remainder is equal to one of the two
given numbers c or d.
Here's what I got, but they said it was wrong, you need to define the remainder in some other way.

a=25;
b=5;
c=5;
d=3;
if a/b==c || a/b==d
disp ('верно');
else
disp ('неверно');
end

What needs to be fixed?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
kakoh, 2014-02-27
@tatattv

if mod(a,b)==c || mod(a,b)==d

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question