Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Expand
titleHvis du har prøvd selv, trykk her for å se svaret...
Code Block
titlefahrenheit.m
svar = input('Ønsker du å skrive inn egne Celsius-verdier? (ja/nei) ', 's');
if strcmp(svar, 'ja')
    antall = input('Hvor mange verdier? ');
    for i = 1:antall
        celsius = input('Skriv inn Celsius-verdi: ');
        skriv_ut_fahrcels2fahr(celsius);
    end
else
    skriv_ut_fahrcels2fahr(-20);
    skriv_ut_fahrcels2fahr(0);
    skriv_ut_fahrcels2fahr(18);
    skriv_ut_fahrcels2fahr(37);
    skriv_ut_fahrcels2fahr(100);
end

Oppgave 3.2.4: Finn elementposisjon i vektor

...