Question: Test read _ grid _ width _ S 1 _ 0 ( [ 0 ] read _ grid _ width ( [ 7 , 5
Test readgridwidthS readgridwidth failed Incorrect output
Your program produced these lines of output:
Calling readgridwidth.
Enter the width of the playing field:
error: could not find instruction at
tip: try using the command the instruction that brought you here was:
xxfa bne $t $zero, # bnez $t strreadgridwidthnotmultiple
The correct lines of output for this test were:
Calling readgridwidth.
Enter the width of the playing field: Bad input, the grid width must be a multiple of
Enter the width of the playing field: Bad input, the width must be between and
Enter the width of the playing field: Bad input, the width must be between and
Enter the width of the playing field: Bad input, the width must be between and
Enter the width of the playing field:
Returned from readgridwidth
Checking the value of gridwidth:
The difference between your output and the correct output is:
Calling readgridwidth.
Enter the width of the playing field: Bad input, the grid width must be a multiple of
Enter the width of the playing field: Bad input, the width must be between and
Enter the width of the playing field: Bad input, the width must be between and
Enter the width of the playing field: Bad input, the width must be between and
Enter the width of the playing field:
Returned from readgridwidth
Checking the value of gridwidth:
error: could not find instruction at xc
tip: try using the 'back command the instruction that brought you here was:
xxfa bne $t $zero, # bnez $t strreadgridwidthnotmultipleHi, my MIPS code keeps outputting error message see in last image Could you help correct my code so that it is equivalent to the provided C code thanks.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
