let=lower(input('U for up, D for down, Q for quit:','s'));
cnt=cnt+1;
if let~='u' && let~='d' && let~= 'q'
fprintf('Please enter a valid response!\n')
elseif let=='u' && total>0
total=total-5;
if total==0
fprintf('Flaps Full UP')
end
fprintf('Flaps at %g degrees\n',total)
elseif let=='d' && total<30
total=total+5;
if total==30
fprintf('Flaps Full DOWN')
end
fprintf('Flaps at %g degrees\n',total)
elseif let=='q'
fprintf('Thanks for testing your flaps design!\n')
again=false;
elseif total== 30
fprintf('Flaps Full DOWN\n')
elseif total==0
fprintf('Flaps Full UP\n')
end
end