作业帮 > 综合 > 作业

编写函数fun求两个整数的最小公约数和最小公倍数.同时写出测试用的主函数.

来源:学生作业帮 编辑:作业帮 分类:综合作业 时间:2024/05/12 08:49:34
编写函数fun求两个整数的最小公约数和最小公倍数.同时写出测试用的主函数.
#include "stdafx.h"
#include
int sct(int m,int n)
{
int temp,a,b;
if (m>y;
g=sct(x,y);
cout
再问: 是fun函数吗?测试用的主函数是什么?
再答: 你把所有的sct都给改成fun就成fun函数了,主函数就是 int main(int argc, char* argv[]) { int x,y,g; coutx>>y; g=sct(x,y); cout