Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

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