当前位置:网站首页>C language "Recursion Series": recursively realizing the n-th power of X
C language "Recursion Series": recursively realizing the n-th power of X
2022-06-25 08:29:00 【zbossz】
#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include<math.h>
float p(float x, int n)
{
if (n == 0)
x = 1;
else
x = p(x, n - 1) * x;
}
int main()
{
printf("%f",p(2,8));
return 0;
}
边栏推荐
- How to calculate the D value and W value of statistics in normality test?
- Rosparam statement
- With the beauty of technology enabled design, vivo cooperates with well-known art institutes to create the "industry university research" plan
- Ffmpeg+sdl2 for audio playback
- 2021 "Ai China" selection
- Iframe is simple to use, iframe is obtained, iframe element value is obtained, and iframe information of parent page is obtained
- SwipeRefreshLayout+RecyclerView无法下拉问题排查
- Cloud computing exam version 1 0
- Retrieval model rough hnsw
- 软件工程复习题
猜你喜欢
How is the ISM model analyzed?
Wechat applet opening customer service message function development
How do I install the software using the apt get command?
How to calculate the positive and negative ideal solution and the positive and negative ideal distance in TOPSIS method?
NIPS 2014 | Two-Stream Convolutional Networks for Action Recognition in Videos 阅读笔记
2021 "Ai China" selection
如何成为一名软件测试高手? 月薪3K到17K,我做了什么?
TCP acceleration notes
故障:Outlook 收发邮件时的 0x800CCC1A 错误
Retrieval model rough hnsw
随机推荐
[thesis study] vqmivc
Self made ramp, but it really smells good
堆栈认知——栈溢出实例(ret2libc)
What do various optimizers SGD, adagrad, Adam and lbfgs do?
使用pytorch搭建MobileNetV2并基于迁移学习训练
SwipeRefreshLayout+RecyclerView无法下拉问题排查
DNS protocol and its complete DNS query process
Overview of image super score: the past and present life of image super score in a single screen (with core code)
How to calculate the correlation coefficient and correlation degree in grey correlation analysis?
软件确认测试有什么作用?确认测试报告的价格是多少?
[QT] QT 5 procedure: print documents
Retrieval model rough hnsw
如何设计测试用例
VOCALOID notes
417 sequence traversal of binary tree 1 (102. sequence traversal of binary tree, 107. level traversal of binary tree II, 199. right view of binary tree, 637. layer average of binary tree)
Scanpy (VII) spatial data analysis based on scanorama integrated scrna seq
[QT] qtcreator shortcut key and QML introduction
4個不可不知的采用“安全左移”的理由
Can I grant database tables permission to delete column objects? Why?
NIPS 2014 | Two-Stream Convolutional Networks for Action Recognition in Videos 阅读笔记