diff --git a/program-22/a.out b/program-22/a.out new file mode 100755 index 00000000..c9555c14 Binary files /dev/null and b/program-22/a.out differ diff --git a/program-22/program.c b/program-22/program.c new file mode 100644 index 00000000..b340bcd8 --- /dev/null +++ b/program-22/program.c @@ -0,0 +1,17 @@ +#include +int main() +{ + int a,r,l,b; + printf("enter the two number\n"); + scanf("%d%d",&a,&b); + int x=a; + int y=b; + while(b!=0) + { + r=a%b; + a=b; + b=r; + } + l=(x*y)/a; + printf("GCD=%d & LCM=%d\n",a,l); +}