Question: write the following code in MIPS. Should be a addition table. System.out.print( |); for (int c = 0; c < 13; c++){ System.out.print( ); if
write the following code in MIPS. Should be a addition table.
System.out.print(" |"); for (int c = 0; c < 13; c++){ System.out.print(" "); if (c < 10){ System.out.print(" "); } System.out.print(c); System.out.print(" "); } System.out.println(); System.out.print("----+"); for (int c = 0; c < 13; c++) { System.out.print("----"); } System.out.println(); for (int r = 0; r < 13; r++){ System.out.print(" "); if (r < 10){ System.out.print(" "); } System.out.print(r); System.out.print(" "); for (int c = 0; c < 13; c++) { int s = r+c; System.out.print(" "); if (s < 10){ System.out.print(" "); } System.out.print(s); System.out.print(" "); } } System.out.println(); }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
