simple elseif loop doesn't work
3 views (last 30 days)
Show older comments
hi!
This is my code:
T = input('enter a number: ')
if 0 < T < 100
h = T - 10
elseif T > 100
h = 0.45*T+900
end
But even in case I type in "110", the result would be "100", which is wrong and shows that the programm doesn't enter the elseif statement. Why?
Thanks
0 Comments
Accepted Answer
More Answers (0)
See Also
Categories
Find more on Loops and Conditional Statements in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!