Thats what I asked to do.
This is my code so far. But its not working for the str and complex part. Can anyone kindly help me?
p = input('To play the game, enter a shooting angle between -90 and 90 degree: ');for i = 1 : pif p(i) <= -90 || p(i) >= 90 disp('Enter a real number between -90 and 90 degree!!!'); breakelseif p(i) == 'str' disp('Enter a real number between (-90~90) rather than string'); breakelseif p(i) == 'complex' disp('Enter a real number between (-90~90) rather than any complex number') breakendend
Best Answer