1331com银河游戏

cԳ˷

cԳ˷

ƽ̨ûĻоѡcԳ˷صģ1CУг˷һ 2Cг˷αʾ 3cԳ˷ 4CԳ˷ 5Уг˷һ 6Cеij˷㷨 7cԼ˷ 8ñ༭CԼ˷ 9ѧC 򵥵ij˷ʲô 10c^ʲôʱʲôʱdz˷
cԳ˷
ƽ̨û 2018-06-06 16:55:38

Ǿѡƽ̨ûʱ

Сһ920
Сһ920


Сһ920CУг˷һ

Ľѱ3103˵
ûг˷һΪbasicõij˷^CΪλ
Cг˷һܡõij˷һ˷ȡ֮
pow( double a , double b)ڵͷļΪ
һα༭ʱ 2017-01-15



Cг˷αʾ

Ľѱ560˵

  1. CУ˷Ҳһ

  2. Cڿ⺯ṩһ˷ĺ

  3. Ϊpow

  4. ͷļΪ math.h

  5. ԭΪdouble pow (double x,double y)

  6. ĹΪ x^yֵؽ

һα༭ʱ Ƽ2017-10-11 12:06:28
lnhldwycjsq
lnhldwycjsq


lnhldwycjsqcԳ˷

Һͬѧо #include void main() { int cf(int a); int a,m,c,i; scanf("%d,%d",&a,&m); for(i=1;i<=m;i++) printf("%d\n",c); } int cf(int a) { static int f=1; f=f*a; return(f); } һСʱˣҲûѧĹ... Һͬѧо
#include
void main()
{
int cf(int a);
int a,m,c,i;
scanf("%d,%d",&a,&m);
for(i=1;i<=m;i++)
printf("%d\n",c);
}
int cf(int a)
{
static int f=1;
f=f*a;
return(f);
}
һСʱˣҲûѧĹ
Ŀǣúama,mΪ
Ľѱ9342˵
CԵͷļ math.hжpow(x,y)ؽxyηУxyֵdoubleͣʹʱҪ#include

C++Լ߼ж˴˲C++У˷ͷcmathͷļ¡ʹʱͷļ#include

64λݽг˷㣬pow޷侫ҪҪͨʵ֡

˷ƣpow(double,double) һΪfloatdoublelong double͡5³;ʱ ֱʹ pow(5,3)ؽΪ125
һα༭ʱ Ƽ2017-09-13 03:48:27
HyperGod
HyperGod


HyperGodCԳ˷

ôд
Ľѱ7458˵

CԵij˷ÿ⺯pow

powԭͣdouble pow( double x, double y );

ͷļmath.h/cmath(C++)

ܣxyݡ

ο룺

#include 
#include 
int main()
{
int a=3,b=2;
double t = pow(a,b);//3ƽ 
printf("%.0lf\n",t);
return 0; 
}
/*

9
*/

һα༭ʱ Ƽ2018-01-25 17:59:09



Уг˷һ

Ȼ
Ľѱ3477˵
˵Щʲôкpow(x,y)˼xyηҪӺͷ
һα༭ʱ Ƽ2018-04-12 20:36:30
zuozhu_315
zuozhu_315


zuozhu_315Cеij˷㷨

mathԴpowǸȲֻ֪˷㷨λæлˣͨƸ20ʳ
Ϻǰ㣬µ㷨ǻϵͳ͵ģʹdoubleҲֻС14λԶԶҪԼд㷨ַʵֵģæ
Ľѱ608˵
ʽΪa.xxxոbس  ǰҪСģʹa.0ոbسʵ2.15000ηIJ
#include
#include
int qq(int n)
{ int i, sum=1;
for(i=1;i<=n;i++)
sum=10*sum;
return(sum);
}

int main()
{
float r;
int n;
while(1)
{
char a[10000];
long int b[10000];
int k,h,m,i,j,z,g,t,q,e;
long int c=0;
if(scanf("%s%d",a,&n)==EOF)break;
for(i=0;a[i];i++)
if(a[i]=='.')k=i;
m=i-k-1;
for(i=k;i a[i]=a[i+1];
h=i;
for(i=0;i b[i]=a[i]-48;
for(i=0;i for(i=0;i for(e=1;e {
for(i=0;i
for(j=0;j if(b[j]>=10){t=b[j];b[j]=t%10;b[j+1]+=t/10; }
if(b[h-1]>=10)
{
t=b[h-1];
q=b[h-1];
z=1;
while(t>=10)
{
t=t/10;
z++;
}
g=z;
while(z>=1)
{
b[h+g-z-1]=q/qq(g-z)%10;
z--;
}

h=h+g-1;
}
}

if(h {
printf(".");
for(j=m*n-1;j>h-1;j--)printf("0");
for(j=0; ;j++)if(b[j]!=0)break;
for(i=h-1;i>=j;i--)
printf("%d",b[i]);

}
if(h==m*n)
{ for(j=0; ;j++)if(b[j]!=0)break;
printf(".");
for(i=h-1;i>=j;i--)
printf("%d",b[i]);
}
if(h>m*n)
{
for(j=0; ;j++)if(b[j]!=0)break;
if(j {
printf(".");
for(i=m*n-1;i>=j;i--)printf("%d",b[i]);
}

if(j<=m*n-1&&b[h-1]!=0)
{ for(i=h-1;i>=m*n;i--)
printf("%d",b[i]);
printf(".");
for(i=m*n-1;i>=j;i--)printf("%d",b[i]);
}
if(j>=m*n)

{
for(i=h-1;i>=m*n;i--)
printf("%d",b[i]);
}
} printf("\n");

}
return 0;
}
һα༭ʱ Ƽ2017-09-17 13:28:38



cԼ˷

#include #include double funtion(double x,double y); int main(){ double a,b,result; printf("input a,b:"); scanf("%lf%lf",&a,&b); result=funtion(a,b); printf("result=%f",result); } double funtion(double x,dou... #include
#include

double funtion(double x,double y);

int main(){
double a,b,result;
printf("input a,b:");
scanf("%lf%lf",&a,&b);

result=funtion(a,b);
printf("result=%f",result);
}
double funtion(double x,double y){
double anser;
anser=pow(x,y);
return anser;
}ʲô
Ľѱ4817˵
powyint͵
⣬ȻûʲôӰ죬Dzò˵anserдˣanswerо㶨ĺȫûˣĺֻǴصһк
һα༭ʱ Ƽ2016-07-31 18:59:24



ñ༭CԼ˷

룺a n ֵ a<=150 a n η 3 λ 1 10 0↵ The last 3 numbers is 1.↵ 2 2 8↵ The last 3 numbers is 256.↵ 3 100 10↵ The last ... 룺a n ֵ a<=150
a n η 3 λ

1 10 0↵ The last 3 numbers is 1.↵
2 2 8↵ The last 3 numbers is 256.↵
3 100 10↵ The last 3 numbers is 000.↵
↵س
Ľѱ9608˵

#include
int ChengFang(int x,int n)
{
    int tmp;
    if(n==1)
        return x;
    if(n==0)
        return 1;
    if(n%2==0){
        tmp=ChengFang(x,n/2);
        return tmp*tmp;
    }
    tmp=ChengFang(x,(n-1)/2);
    return tmp*tmp*x;
}
int main() 
{
    int x,y;
    x=ChengFang(3,4);
    y=ChengFang(2,5);
    printf("3^4=%d   2^5=%d  \n",x,y);
}

һα༭ʱ Ƽ2016-07-31 20:53:07
Сɱ
Сɱ


СɱѧC 򵥵ij˷ʲô

#include #include double pow(double x, double y); double times, year = 10, year_rate = 1.09; int main(void) { times = pow(year_rate, year); printf("10ҹֵ%d", times); ... #include
#include

double pow(double x, double y);
double times, year = 10, year_rate = 1.09;

int main(void)
{

times = pow(year_rate, year);
printf("10ҹֵ%d", times);

return 0;
}
Ľѱ8037˵

CԳ˷,Ұ,㿴(Ķĵطע)

#include 
#include 
//double pow(double x, double y);//ȥ,Ϊmath.hеpow,math.hеĺҪͿ.
double times, year = 10, year_rate = 1.09;
int main(void)
{
 times = pow(year_rate, year);
 printf("10ҹֵ%d", (int)times); //timesǿתint,Էʽ%dҪ.
 return 0;
}

н
10ҹֵ2

һα༭ʱ 2017-10-14
˹
˹


˹c^ʲôʱʲôʱdz˷

Ľѱ500˵
C ^ ֻ
Cûг˷г˷㺯pow
һα༭ʱ Ƽ2016-04-08 12:17:09
网站地图

银河1331官网