Question: The pseudocode shown in figure functionally describes the chronometer of lesson 2 . 1 . The update procedure updates the values of h , m
The pseudocode shown in figure functionally describes the chronometer of lesson The update procedure
updates the values of and whenever a clock pulse arrives refpositiveedge signal
Which of the following pieces of pseudocode correctly implement the update procedure?. Mark all that
apply.
loop
If resetON then h;textrmfi;s;textrmt
else if start ON then
while stop OFF loop
if refpositiveedge TRUE then updateh m s t;
end if;
end loop;
end if;
end If;
end loop;
ttextrmt
If t then tmathrm;addonesecond ;
else addonesecond ;
end if;
s s addonesecond;
If s then s ; addoneninute ;
else addoneminute ;
end if;
nf nil addoneminute;
If n then nil ; addonehour ;
else addonehour ;
end if;
h h addonehour;
If h then h; end If;
If t then textrmt;mathrm addonesecond ;
else addonesecond ;
end if;
ttextrmtmathrm ;
If smathrm then s;mathrm addoneninute ;
else addoneminute ;
end If;
s s addonesecond;
If nt then in ; addonehour ;
else addonehour ;
end if;
ni ni addoneminute;
If h then h B; end If;
h h addonehour;
ttextrmt
If t then textrmt;ssmathrm ; end if;
If s then s;mm;mathrm end if;
If nt then n ; h h; end If;
If h then h ; end if;
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
