红色警戒3电脑版下载:在输入数据时如何输入指数(如5的3次方怎么输入?)急!

来源:百度文库 编辑:杭州交通信息网 时间:2024/04/29 22:07:10
在Word和office里怎么输入5的右上角的数字(幂)!

#include <math.h>
#include <stdio.h>

void main( void )
{
double x = 2.0, y = 3.0, z;

z = pow( x, y );
printf( "%.1f to the power of %.1f is %.1f\n", x, y, z );
}

Output

2.0 to the power of 3.0 is 8.0

不知道你是问那种语言中……
与c相关的就用楼上的库函数pow(a,b)
a,b是double型变量。
其他的用一楼的表示方法。

5^3

5^3