Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

can someone help me out with this

1 visualización (últimos 30 días)
Liam Sullivan
Liam Sullivan el 4 de Mzo. de 2020
Cerrada: MATLAB Answer Bot el 20 de Ag. de 2021
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 comentarios
per isakson
per isakson el 5 de Mzo. de 2020
Editada: per isakson el 5 de Mzo. de 2020
The if-statement doesn't handle the case c) copper.
Srivardhan Gadila
Srivardhan Gadila el 9 de Mzo. de 2020
@Liam Sullivan can you provide the error you are getting?

Respuestas (0)

La pregunta está cerrada.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by