25 lines
295 B
C++
25 lines
295 B
C++
|
#include<iostream.h>
|
|||
|
int main()
|
|||
|
{
|
|||
|
int m,n,a,b,p,q;
|
|||
|
cout<<"<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>m,n:\n";
|
|||
|
cin>>m>>n;
|
|||
|
a=m;
|
|||
|
b=n;
|
|||
|
while(a%b!=0)
|
|||
|
{
|
|||
|
p=a%b;
|
|||
|
a=b;
|
|||
|
b=p;
|
|||
|
}
|
|||
|
for(q=1;q<=m*n;q++)
|
|||
|
if((q%m==0)&&(q%n==0))
|
|||
|
break;
|
|||
|
cout<<"<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Լ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>"<<b<<endl;
|
|||
|
cout<<"<EFBFBD><EFBFBD>С<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"<<q<<endl;
|
|||
|
return 0;
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
|