Compiler Design 2023
Testcase c20 of Assignment 4:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// Euclid's algorithm to compute the greatest
// common divisor of two integers:
int gcd(int a, int b)
{
while (b != 0) {
if (a > b) {
a = a - b;
} else {
b = b - a;
}
}
return a;
}
int main ()
{
gcd(22,12);
return 0;
}