Monday, October 7, 2013

ALGORITHM TO FIND BIGGEST OF TWO NUMBERS (USING IS ELSE STRUCTURE)



STEP 1.              VALUE1<--0, VALUE2<--0,MAX<--0
STEP 2.              Read VALUE1, VALUE2
STEP 3.              IS (VALUE1 > VALUE2) then
Begin
MAX <-- VALUE1
End
Else 
Begin
MAX <-- VALUE2
End

STEP 4.              Print “The largest value is”, MAX

No comments:

Post a Comment