function gcd(a,b) x=a; y=b; while y~=0 r=modulo(x,y) x=y; y=r; end printf("GCD(%d,%d)=%d",a,b,x) endfunction n1=input("Enter 1st number:") n2=input("Enter 2nd number:") gcd(n1,n2)