新手C语言程序求解 无法解析的外部符号 _ptintf,该符号在函数 _main 中被引用

#include <stdio.h>
int main(){
int a,b,n,i;
printf("please enter two number ,like a,b\n");
scanf("%d,%d",&a,&b);
if (a>b)
n=b;
else n=a;
for(i=n ;i>=n;i--){
if(b%i==0&&a%i==0)
ptintf("the gongyueshu between %d and %d is %d\n",a,b,i);
}
return 0;
}
小白看不出问题。。。求教啊。。。。

#include <stdio.h>
int main(){
        int a,b,n,i;
        printf("please enter two number ,like a,b\n");
        scanf("%d,%d",&a,&b);
        if (a>b)
        n=b;
        else n=a;
        for(i=n ;i>0;i--){          // i>0,从小的数递减到1
                if(b%i==0&&a%i==0)  //原函数的printf写错了。
                printf("the gongyueshu between %d and %d is %d\n",a,b,i);
        }   
        return 0;
}

温馨提示:答案为网友推荐,仅供参考
第1个回答  2014-12-11
ptintf --- printf 拼写。
相似回答