b" mean in pseudo-code? In the assignment, we must use a specific algorithm to find the largest common divisor in the ass...">

What does "while a <> b" mean in pseudo-code?

In the assignment, we must use a specific algorithm to find the largest common divisor in the assembly written in the assembly.

The algorithm is as follows:

Input:a,b
Local: c
 While a <> b
     While a > b
         c = a - b
         a = c
     End While
     While b > a
         c = b - a
         b = c
     End While
End While
At this point, GCD(a,b)=a=b.  

What does a <b> mean in the third line?

+3
source share
2 answers

In some older languages, the operator <>means "not equal" (you can see it as "less or more"). The convention !=is largely occupied today.

+7
source

<> is the inequality operator.

+1
source

All Articles