还有!上面的程序还有错!!不健壮!!呵呵!!你输入 12 12 时就会出错!!答案就是0了!!

2005-04-25 17:11

2005-04-25 17:35
//不知道你说的是不是这个意思 //求助~~~急需N的M次方的程序代码 !!
#include <stdio.h> #include <math.h>
void main() { double N,M; double total; printf("please enter the two num \" N \" and \" M \" : \n"); scanf("%lf %lf", &N ,&M); fflush(stdin); total=pow(N,M); printf("The resule is : %lf\n",total); }
fflush(stdin) 是啥意思啊??????

2005-04-25 18:23
2005-04-25 18:33
2005-04-25 19:32

2005-04-26 19:54
[此贴子已经被作者于2005-4-26 21:41:05编辑过]

2005-04-26 21:32
Calculates x raised to the power of y.
double pow( double x, double y );
2005-04-27 11:09
2005-04-27 12:40

2005-04-27 21:18