随笔分类 -  c++

摘要:题目:实现n阶乘 分析:1*2*3....*n,怎么实现?手头上:顺序、选择、循环。进过分析,先写循环。 实现: #include "stdio.h" int fun(int n) { if(n == 0) return 1; return n*fun(n-1); } int main() { in 阅读全文
posted @ 2021-01-21 23:18 An_One 阅读(38) 评论(0) 推荐(0)
摘要:#include <iostream> #include "RoleManage.h" using namespace std; //左移代表乘2 右移代表除2 typedef struct set { int size;//能存储元素规模 //数组大小应该看类型 如v为 ushort应该一个数可以 阅读全文
posted @ 2021-01-04 19:02 An_One 阅读(109) 评论(0) 推荐(0)