多谢各位大虾! 我已经找到Turboc了,在此多谢各位在大虾!但是又出新问题了。
为什么TC中编译的程序与VC中的结果不同?TC中结果是:239296而VC中是:370368(正
确)(输入3,6)源程序如下:
#include <conio.h>
#include <math.h>
#include <stdio.h>
/*****found******/
fun(int a,int n)
{ int j=0;
long s=0,t=0;
for(j=1;j<=n;j++)
{
/******found******/
t=(10*t)+a;
/*printf("%dt=%d\n",j,t);*/
s=s+t;
}
return(s);
}
main()
{ int x,m;
printf("\nPlease enter x and m:\n");
scanf("%d,%d",&x,&m);
printf("\nThe value of fucnction is:%ld",fun(x,m));
}