
# include <iostream>
# include <string >
using namespace std;
int main()
{
int a,b,c;
cout<< "Enter two nos :"<<endl;
cout<<endl;
cout<< "Enter first no. : ";
cin>>a;
cout<< "Enter sec. no. : ";
cin>>b;
c=a*b;
while(a!=b)
{
if(a>b)
a=a-b;
else
b=b-a;
}
cout<< "HCF = " << a<<endl;
cout<< "LCM = " << c/a<<endl;
return 0;
}
LCM example in c/c++ source code, LCM example source code, source code,
LCM example in c/c++ source code, LCM example source code, source code,
LCM example in c/c++ source code, LCM example source code, source code,
LCM example in c/c++ source code, LCM example source code, source code,
Dear Readers if you have any query/question feel free to ask me via comment box given below. Also Follow us on social media site and share that post with your friends.
useful tutorial keep it up...
EmoticonEmoticon