A65985. 阅读程序填写结果:#include<cstdio>
编程题
知识点
题目描述
阅读程序填写结果:
#include<cstdio>
#include<iostream>
using namespace std;
int fun(int x)
{
if(x==0 || x==1)
return 3;
else
return x+fun(x-2);
}
int main()
{
int k;
cin>>k;
printf("%d", fun(k));
return 0;
}题号 | 第1题 | 第2题 | 第3题 |
输入数据 | 1 | 3 | 9 |
输出数据 |