以下是用辗转相除法求两个正整数m和n的最大公约数的程序请填空#include stdio hmain int rmnt;PrintfEnter m n;scanfdd 【1】;printfm=d n=dmn;r=【2】;while【3】 m=【4】;n=r;r=【5】;printfH C F=dnn;
#include <stdio. h> main() { int r,m,n,t; printf("Enter m, n:"); scanf("%d,%d",&m,&n); printf("m=%d, n=%d",m,n); r=m%n; while(r) { m=n; n=r; r=m%n; } printf("H. C, F=%d\n",n); }
原文地址: http://www.cveoy.top/t/topic/h6Ef 著作权归作者所有。请勿转载和采集!