I'm strying to run a script but keep getting an error message.
T = input('Enter your temperature')
if T<=96
disp('You are either hypothermic or a zombie')
elseif
96<T<99
disp('Your temperature is normal')
elseif
99<=T<=102
disp('You are running a fever')
else
T>102
disp('Go to the emergency room now!')
end

답변 (1개)

Jim Riggs
Jim Riggs 2020년 3월 4일
편집: Jim Riggs 2020년 3월 4일

0 개 추천

Try this:
T = input('Enter your temperature')
if T<=96
disp('You are either hypothermic or a zombie')
elseif T<99
disp('Your temperature is normal')
elseif T<=102
disp('You are running a fever')
else
disp('Go to the emergency room now!')
end

카테고리

도움말 센터File Exchange에서 MATLAB에 대해 자세히 알아보기

태그

질문:

2020년 3월 4일

편집:

2020년 3월 4일

Community Treasure Hunt

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

Start Hunting!

Translated by