求M和N最大公约数?#include<stdio.h>void main(){ int m, n, r; scanf("&d,%d",&m,&n); do { m%n==r; if(r==0); printf("big is %d\n",n); else { n==r; m==n; m%n==r; } }while(r==0); if(r==0); printf(&
来源:学生作业帮助网 编辑:作业帮 时间:2024/11/29 16:01:25
求M和N最大公约数?#include<stdio.h>void main(){ int m, n, r; scanf("&d,%d",&m,&n); do { m%n==r; if(r==0); printf("big is %d\n",n); else { n==r; m==n; m%n==r; } }while(r==0); if(r==0); printf(&
求M和N最大公约数?
#include<stdio.h>
void main()
{
int m, n, r;
scanf("&d,%d",&m,&n);
do
{
m%n==r;
if(r==0);
printf("big is %d\n",n);
else
{
n==r;
m==n;
m%n==r;
}
}while(r==0);
if(r==0);
printf("big is %d\n",n);
有十个警告还有一个错误,求指导
求M和N最大公约数?#include<stdio.h>void main(){ int m, n, r; scanf("&d,%d",&m,&n); do { m%n==r; if(r==0); printf("big is %d\n",n); else { n==r; m==n; m%n==r; } }while(r==0); if(r==0); printf(&
#include
int main()
{
int m, n, r;
scanf("%d%d",&m,&n);
printf("n=%d\n",n);
do
{
r=m%n;
if(r==0)
printf("big is %d\n",n);
else
{
n=r;
m=n;
}
}while(r!=0);
if(r==0);
printf("big is %d\n",n);
}
LZ基础没打好,好好看看书中的例子,
输入的格式,赋值的格式,条件判断等等
都需要好好看看