Azzera filtri
Azzera filtri

Info

Questa domanda è chiusa. Riaprila per modificarla o per rispondere.

can someone help me out with this

1 visualizzazione (ultimi 30 giorni)
Liam Sullivan
Liam Sullivan il 4 Mar 2020
Chiuso: MATLAB Answer Bot il 20 Ago 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 Commenti
per isakson
per isakson il 5 Mar 2020
Modificato: per isakson il 5 Mar 2020
The if-statement doesn't handle the case c) copper.
Srivardhan Gadila
Srivardhan Gadila il 9 Mar 2020
@Liam Sullivan can you provide the error you are getting?

Risposte (0)

Questa domanda è chiusa.

Community Treasure Hunt

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

Start Hunting!

Translated by