求任意数的任意次方最后三位数的值

    技术2022-05-20  32

    #include <stdio.h> #include <math.h> void main() { int a,i,b; long sum,n,s; scanf("%d%d",&a,&b); sum = pow(a,b); for ( i=3; i>0; i-- ) { s = sum/pow(10,i-1); n = s; printf("%ld ",n); } printf("/n"); }


    最新回复(0)