if , while 문 혼용해서 조건문 만족하기

9 visualizzazioni (ultimi 30 giorni)
jinhong lee
jinhong lee il 5 Ott 2020
x = input(' 점수입력 (1~1000)');
if 200<=x & x<=349
grade='A구간'
elseif 500<=x & x <=748
grade = 'B구간'
elseif 100<=x & x <=550
grade = 'C구간'
elseif 880<=x & x <=990
grade = 'D구간'
elseif 400<=x & x <=649
grade = 'F구간'
else
grade = 'E구간'
end
while x<=1000
x = 177 , 247 , 975 ;
disp(x) = '특정구간'
end
제 스크립트는 이거구요
근데 문제와 같이 어덯게 표현해야 되는건가요
아무리 머리를 굴려도 정답이 안나옵니다.

Risposte (0)

Categorie

Scopri di più su Guidance, Navigation, and Control (GNC) in Help Center e File Exchange

Tag

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!