Question: The following code contains some bugs. You can click on Run Script and check the errors in the Output box to help debug your code.


The following code contains some bugs. You can click on Run Script and check the errors in the Output box to help debug your code. Debug the code so that there are no errors when it runs. x=2;y=0 if x=1 y=2; elseif x==2 y=3; elseif x==3 y=4; \begin{tabular}{r|c} 1 & %% Data section \\ 2 & x=2;y=0 \\ 3 & %% code section \\ 4 & if x=1 \\ 5 & y=2; \\ 6 & elseif x==2 \\ 7 & y=3; \\ 8 & elseif x==3 \\ 9 & y=4; \\ 10 & \\ 11 & \end{tabular}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
