11智能在线
新记
C++中pow(x,y)函数怎么用?
如题所述
举报该文章
相关建议 2017-12-31
//假设要计算2的10次方
#include <stdio.h>
#include <math.h>
void main()
{
int data = pow(2,10);
printf("%d",data);
}
温馨提示:内容为网友见解,仅供参考
当前网址:
https://11.t2y.org/zz/f8772qvs44sss22vvvq.html
其他看法
第1个回答 2017-12-27
pow(x,y)求的是x的y次方;
加上#include<math.h>就可以了;
#include<iostream.h>
#include<math.h>
void main()
{
cout<<pow(2,3);
}
相似回答
大家正在搜
相关问题
c++ pow的用法
C++中pow(x,y)函数怎么用?最好给举个例子…
C++中pow函数
c++的pow( )函数调用的问题
c++中的pow是什么
c++程序 使用系统函数pow()计算xy的值,注意包含头文...
写一个完整的c++程序,使用系统函数pow(x,y)计算x^...