Right now I am stuck as to how do I return z to asking for the conversion method if the 'C to F' is not entered correctly or nothing is entered. Help please.
clear,clcx =[];while isempty(x) x = input('Make a choice(imperial or metric): ','s'); if strcmp(x,'imperial') y = input('Please enter a value: '); z = input('Conversion method (C to F): ','s'); if strcmp(z,'C to F') convert(x,y,z) end elseif strcmp(x,'metric') y = input('Please enter a value: '); z = input('Conversion method (C to F): ','s'); else x =[]; disp('Please make sure the spelling are correct!') endend
Best Answer