#include<stdio.h> int main(){ int n1,n2,x,y; printf("\nEnter two numbers:"); scanf("%d %d",&n1,&n2); x=n1,y=n2; while(n1!=n2){ if(n1>n2) n1=n1-n2; else n2=n2-n1; } printf("L.C.M=%d",x*y/n1); return 0; }
Filled Under
C
LCM program in c with two numbers
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.