Toggle navigation
HUSTOJ
F.A.Qs
Web Board
ProblemSet
Source/Category
Status
Ranklist
Contest
Recent
Login
Problem1876--简单实现x的n次方
1876: 简单实现x的n次方
Time Limit:
1 Sec
Memory Limit:
128 MB
Submit:
0
Solved:
0
[
Submit
] [
Status
] [
Web Board
] [Creator:
]
Description
本题要求实现一个计算x n (n≥0)的函数。 函数接口定义: double mypow( double x, int n ); 函数mypow应返回x的n次幂的值。题目保证结果在双精度范围内。 裁判测试程序样例: #include
double mypow( double x, int n ); int main() { double x; int n; scanf(
Input
双精度浮点数x,次数n
Output
函数mypow应返回x的n次幂的值。题目保证结果在双精度范围内。
Sample Input
Copy
0.24 4
Sample Output
Copy
0.003318
Source/Category
312