nested IF-ELSE statement
4 次查看(过去 30 天)
显示 更早的评论
Please help me solving this matlab code. Thats how the answer should look like:-
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/360262/image.png)
采纳的回答
Image Analyst
2020-9-14
Hint: input(), rem(), sprintf(), while
message = sprintf('>>>>> Enter an integer (0-9)\n blah blah fubar snafu lorem ipsum : ');
Change message passed to input depending on what their input was.
response = '0';
message = sprintf(.....
while response ~= 'x'
response = input(...........
if................
message = ...........
elseif ...........
end
end
See if you can finish it.
5 个评论
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!