摘要:
#include <bits/stdc++.h> using namespace std; int NUM ( int *a) { int b=*a-1; int c=*a-2; if(*a<=2) return 1; else return NUM(&b) + NUM (&c); } int ma 阅读全文
posted @ 2023-10-29 09:44
hanxuyao
阅读(26)
评论(0)
推荐(0)
摘要:
#include <bits/stdc++.h> using namespace std; int NUM ( int &a) { int b=a-1; int c=a-2; if(a<=2) return 1; else return NUM(b) + NUM (c); } int main() 阅读全文
posted @ 2023-10-29 09:43
hanxuyao
阅读(10)
评论(0)
推荐(0)
摘要:
#include <bits/stdc++.h> using namespace std; int NUM ( int a) { if(a<2) return a; else return NUM(a-1) + NUM (a-2); } int main() { int NUMx , NUMy; c 阅读全文
posted @ 2023-10-29 09:43
hanxuyao
阅读(13)
评论(0)
推荐(0)
摘要:
#include <bits/stdc++.h> using namespace std; /* 要接收相应变量的内存中变量的值,需要利用指针, 在接收内存地址的相应变量位置变量前加“*”号, 运算是同样需要带*号,表示指针所指的那个变量参与运算*/ int DSWEASDFCSF ( int *a 阅读全文
posted @ 2023-10-29 09:25
hanxuyao
阅读(11)
评论(0)
推荐(0)
摘要:
#include <bits/stdc++.h> using namespace std; /* 那些参数是地址传递,就在那个变量前加&号 计算时写的是其变量,不加&号*/ int DSWEASDFCSF ( int &a , int b) { int n = a + b ; a = a + 1 ; 阅读全文
posted @ 2023-10-29 09:24
hanxuyao
阅读(14)
评论(0)
推荐(0)
摘要:
#include <bits/stdc++.h> using namespace std; /* 自定义函数必须在调用该函数之前声助 声明时可以不写函数体,但在后面需要将函数体补充完整 按置传递的形参与调用函数一致*/ int DSWEASDFCSF ( int a , int b) { int n 阅读全文
posted @ 2023-10-29 09:24
hanxuyao
阅读(9)
评论(0)
推荐(0)