为什么结果显示是0.0000啊
#include <stdio.h>#include <math.h>
int main()
{
long int x,y,mun,n;
printf("输入随意的两个整数:");
scanf("%d%d",&x,&y);
mun=pow(x,y);
n=mun%1000;
printf("%f\n",n);
return 0;
}
#include <stdio.h> unsigned long m_n( unsigned long m, unsigned long n ) { unsigned r = 1; for( unsigned t=m%1000; n; n>>=1, t=(t*t)%1000 ) if( n&1 ) r = (r*t)%1000; return r; } int main( void ) { unsigned long int x, y; printf( "输入随意的两个整数: " ); scanf( "%lu %lu", &x, &y ); printf( "%lu\n", m_n(x,y) ); return 0; }