elseif to switch statement
Mostra commenti meno recenti
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
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su GNC and Avionics in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!