- 博客(4)
- 问答 (1)
- 收藏
- 关注
原创 线性表的操作,为啥调用LocateElem的时候,输入v却没有反应啊,求大神解答。
#include <iostream>#include <stdio.h>#include <malloc.h>#include <string.h>#include <stdbool.h>using namespace std;#define Maxsize 50typedef char ElemType;typedef struct{ ElemType data[Maxsize]; int length;}S
2021-03-25 17:25:12
318
1
原创 犯二的程度
#include <iostream>using namespace std;// 函数silly:计算数值有多二// 参数:a-存储数值的字符数组,以'\0'结束,所以不需要另一个参数告诉函数数组有多长// 返回值:数值犯二的程度double silly(char a[]);int main(){ char s[102]; // 定义存储数值的数组 cin >> s; // 输入不超过位的整数 double sy = sil
2020-12-05 14:21:27
449
2
原创 C++用递归函数求N的阶乘
#include <iostream>using namespace std;int main (){ int fac(int );//函数声明 int n,t; cin >>n; t=fac (n);//函数调用 cout <<n<<"!="<<t<<endl; return 0;}int fac(int n)//函数定义{ int t; if(n==1||n
2020-12-04 08:32:32
5430
1
原创 除了最高位和最低位,中间的数字是怎么输出的???求各位大佬解答
#include <iostream>using namespace std;// 递归函数splitNum:顺序输出n的各位数字,每个数字占一行// 返回值:无void splitNum(unsigned int n){ // 请在这里补充代码,实现递归函数splitNum /********** Begin *********/ if (n/10==0)cout<<n<<endl; else { split
2020-12-04 00:38:04
254
3
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人