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

조회 수: 9 (최근 30일)
jinhong lee
jinhong lee 2020년 10월 5일
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
제 스크립트는 이거구요
근데 문제와 같이 어덯게 표현해야 되는건가요
아무리 머리를 굴려도 정답이 안나옵니다.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Guidance, Navigation, and Control (GNC)에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!