Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 13 lines (12 sloc) 236 Bytes
/* A program to perform Euclid's Algorithm to compute gcd. */
int gcd(int u, int v) {
if(v == 0) return u;
else return gcd(v, u-u/v*v);
}
void main(void) {
int x;
int y;
x = input();
y = input();
output(gcd(x, y));
}