WHAT AM I DOING WRONG it keeps running the data but every time i enter an invaid
ID: 3587373 • Letter: W
Question
WHAT AM I DOING WRONG
it keeps running the data but every time i enter an invaid data it wont stop repeating the question.. even if it meets all the requirments..
here are test cases:
1) {{'Dr','Bu','Rl','Es','On'},[550,450,400,650,500;950,700,850,750,800;350,450,250,550,600]}
2)(THIS SHOULD NOT WORK): {{'r','t'},[1;3;5]}
3){{'yak','tel','rab','nas'},[670,345,210,456;1500,500,300,4000;67,87,90,35]}
line 9 is suppose to work but it just keeps asking the question over and over again
(Data Validation) If the size of the cell array is not 1 x 2 or if the cell array and matrix within Stocks have a different number of columns, warn the user that the cell array is not the appropriate size and ask again. Keep asking for a new input until the user inputs the data correctly.Explanation / Answer
Looking at the code there seems issues with the while loops (both the loops).
While loops may run for infinite loops becuase the variables which it is
checking is not getting modified (namely Cn and Cs1) also in the second
loop (RS and Cs). Once the code enters the loop, it will not come out.There
must be some missing logic.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.