سورس برنامه ب م م دو عدد
#include <iostream.h>
#include <conio.h>
int bmm (int,int);
int main()
{
int m;
int a,b;
cout<<"lotfan adade aval ra vared konid"<<endl;
cin>>a;
cout<<"lotfan adade dovom ra vared konid"<<endl;
cin>>b;
m=bmm(a,b);
cout<<"bbm 2 adade "<<a<<" va "<<b<<" = "<<m<<endl;
cout<<"paiane barnameie bazgashtie bmm 2 adad"<<endl;
cout<<endl;
return 0;
}//end of int main
int bmm (int a,int b)
{
if (b==0)
return a;
else
return bmm(b,a%b);
}//end of int bmm (int a,int b)