اين هم برنامه ي شما.
سوالي داشتين بپرسين يا اگر جايي رو نفهميدين بگين توضيح بدم.
// AB.cpp : main project file.
#include "stdafx.h"
#include<conio.h>
#include<iostream>
#include<stdlib.h>
using namespace std;
using namespace System;
int main(array<System::String ^> ^args)
{
Console::WriteLine(L"Hello World");
int x,y,p,r,t;
cin>>x>>y;
if (x>y)
{
t=x;
x=y;
y=t;
}
p=x*y;
LOOP1:
r=x-(x/y)*y;
if (r==0)
{
x=y;
y=r;
goto LOOP1;
}
else
cout<<x <<"B.M.M";
getch();
}