Writing a program where user has to input a temperature along with the unit. I then put these into vectors and convert the Temperatures into F,C,K, and R. I'm having a little trouble with my if statements to determine whether the temperature inputted is C,F etc…
Temp = input('Enter the temperature:'); EoSI = input('Enter the units:','s');
I=I+1; if EoSI = 'C'; TempC(I) = Temp; TempK(I) = Temp + 273; TempF(I) = Temp * (9/5) + 32; TempR(I) = TempK(I);
Just need a little help to get me back on the right track, wasn't sure if I can set EoSI = C in a if statement
Best Answer