MATLAB Answers

How do I display squares of all even integers from zero to some positive integer input by the the user.And the program must continuously request a number from the user untill a valid a positive integer is entered

3 views (last 30 days)
Makananise Mulalo
Makananise Mulalo on 30 Aug 2020
My code so far: M=input(enter integer) for c=0:m if (mod(m,2)==0) disp(m*m) end end

  0 Comments

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!