#include <iostream.h>
#include <iomanip.h>

int MDC(int a, int b)
{
  return !(a % b) ? b : MDC(b, a % b);
}

void main()
{
  for(int a = 1; a < 10; a++)
    for(int b = 1; b < 10; b++)
      cout << "MDC(" <<  a << ", " << b << ") = " << setw(4) << MDC(a, b) << "    ";
}
1