Info
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
can someone help me out with this
조회 수: 1 (최근 30일)
이전 댓글 표시
i have to create a script for this problem but i keep getting an error. Why?
metaltype=input('','s');
weight=input('');
price=0;
if(strcmp(metaltype,'gold'))
price=weight*11750;
elseif(strcmp(metaltype,'silver'))
price=weight*177;
end
fprintf('price = %d',price);
댓글 수: 3
per isakson
2020년 3월 5일
편집: per isakson
2020년 3월 5일
The if-statement doesn't handle the case c) copper.
답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!