• 2022-06-08 问题

    输入两个正整数num1,num2,求其最大公约数. #include"stdio.h" ________________________ intmain() { intd; intnum1,num2;printf("pleaseinputtwonumbers: "); scanf("%d,%d",&num1,&num2); ________________________ printf("gongyueshu:%d ",d); return0;} intgongyue(inta,intb) { ________________________ while(b) { temp=a%b; a=b; b=temp; } ________________________ }

    输入两个正整数num1,num2,求其最大公约数. #include"stdio.h" ________________________ intmain() { intd; intnum1,num2;printf("pleaseinputtwonumbers: "); scanf("%d,%d",&num1,&num2); ________________________ printf("gongyueshu:%d ",d); return0;} intgongyue(inta,intb) { ________________________ while(b) { temp=a%b; a=b; b=temp; } ________________________ }

  • 1