(Solved):Consider the following C program for (i = 1; i 10; i++) a = a + b; Draw a flowchart for the…

 

Question

Consider the following C program for (i = 1; i < 10; i++) a = a + b;

Draw a flowchart for the above program.

Translate the C program to MIPS assembly code. Assume that the values of a, b, i are in registers $s0, $s1, $t0, respectively.

 

EXPERT ANSWER

The given code in Programming Language C is:

for (i = 1; i < 10; i++)

a = a + b;

The flowchart for the above code

Scroll to top