elseif to switch statement
古いコメントを表示
I am attempting to switch this into a switch statement.
TestScore = input('Enter a score from the keyboard ')
if(TestScore > 89)
disp('Your Letter grade is A')
elseif(TestScore > 79)
disp('Your Letter grade is B')
elseif(TestScore > 69)
disp('Your Letter grade is C')
elseif(TestScore > 59)
disp('Your Letter grade is D')
else
disp('Your Letter grade is F')
end
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で GNC and Avionics についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!