Advertisement
Sri27119

loop

May 19th, 2024
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MatLab 0.15 KB | None | 0 0
  1. for i = 1:20
  2.     if mod(i,2) == 0
  3.         disp(['Number ',num2str(i),' is Even']);
  4.     else
  5.         disp(['Number ',num2str(i),' is Odd']);
  6.     end
  7. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement