C语言编程:输入两个正整数m和n,求其最大公约数和最小公倍数,

问题描述:

C语言编程:输入两个正整数m和n,求其最大公约数和最小公倍数,

#include int main() { int m,n; int m_cup,n_cup,res; /*被除数,除数,余数*/ printf("Enter two integer:\n"); scanf("%d %d",&m,&n); if (m > 0 && n >0) { m_cup = m; n_cup = n; res = m_cup % n_cup; while (re...