MATLAB: Help me do while function

while loop

Prompt the user to enter a value for height in inches (59-78) and weight in pounds (90-350). I don't know what I can't do that. I enter the height is 50, but it doesn't require me input again. it just show enter the weight.
inches = input('Enter the height in inches (59-78): ');
while (inches <59 && inches>78)
disp('Enter the height in inches (59-78): ');
end
pounds = input('Enter the weight in pounds (90-350): ');
while (pounds <90 && pounds > 350)
pounds = input('Enter the weight in pounds (90-350): ');
end

Best Answer

You are yusing && operators indicating that x has to be less than 59 and greater than 78. This isn't possible!
You probably mean to have a ||, the or operator.
Related Question