//
// main.cpp
// practise
//
// Created by 王为众 on 16/4/22.
// Copyright © 2016年 王为众. All rights reserved.
//
#include <iostream>
#include<cmath>
int main()
{
using namespace std;
int x,y;
cin>>x>>y;
int max(int,int);
cout<<"the max of two number is:"<<max(x,y)<<endl;
int min(int, int);
cout<<"the min of two number is:"<<min(x,y)<<endl;
return 0;
}
int max(int a,int b)
{
if(b!=0)
return max(b,a%b);
else
return a;
}
int min(int a,int b)
{
int c;
c=a*b/max(a,b);
return c;
}
关于输入两个值后输出最大公约数和最小公倍数

