以下程序的功能是求任意两个整数a和b的最大公约数 并予以显示 程序的划线处应填入________。 #inc
已帮助 人
以下程序的功能是求任意两个整数a和b的最大公约数,并予以显示,程序的划线处应填入________。 #include <stdio.h> long cod(long n1,long n2) { long t; while(n2) { ________; n1=n2;n2=t; } return n1; } int main() { long a,b,x; printf("Please input two numbers:"); scanf("%ld%ld",&a,&b); x=cod(a,b); printf("%ld,%ld,%ldn",a,b,x); }

回答
共1条回复-
t=n1%n2和n1
