Back To C++ Loops Index
//program to find lcm and hcf of 2 numbers using while loop #include
#include
void main() { int a,b,c; cout<<"Enter two nos :"; cin>>a>>b; c=a*b; while(a!=b) { if(a>b) a=a-b; else b=b-a; } cout<< "HCM \t= " <