Implement the following high-level code segments .Assume the
integer variables g ,h ,m ,and r are in registers $s0 and $s1, $s2,
$s3, respectively.
if (g <= h)
r=g +h+m;
else
r =g *h*3;
Answers
Answered by
0
Given : if (g <= h)
r=g +h+m;
else
r =g *h*3;
integer variables g ,h ,m ,and r are in registers $s0 and $s1, $s2,$s3,
To Find : Value of r
Solution:
g = 0
h = 1
m = 2
r = 3
if (g <= h)
0 <= 1 True hence with in if executed else would not be executed
hence r = g + h + m
r = 0 + 1 + 2
=> r = 3
Learn More:
Write a a algorithm for a program that adds two digits numbers ...
https://brainly.in/question/14599411
https://brainly.in/question/17827421
Similar questions