write a function that takes as input a real number and checks to see if it is di
ID: 3786166 • Letter: W
Question
write a function that takes as input a real number and checks to see if it is divisible by 5 . an appropriate message indicating the result should be the output ( in matlab) write a function that takes as input a real number and checks to see if it is divisible by 5 . an appropriate message indicating the result should be the output ( in matlab) write a function that takes as input a real number and checks to see if it is divisible by 5 . an appropriate message indicating the result should be the output ( in matlab)Explanation / Answer
function div(n)
if mod(n,5) == 0
disp('The number is divisible by 5')
else
disp('The number is not divisible by 5')
end
end
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.