无奋斗不青春!
无奋斗不青春!
全部文章
分类
C语言(59)
Java(19)
Java面试专栏(5)
SSM项目(5)
剑指Offer(55)
单调栈(5)
开发软件安装(1)
数据结构(24)
未归档(2)
秒杀项目实践(2)
经验贴(3)
面试题(1)
题解(3)
归档
标签
去牛客网
登录
/
注册
无奋斗不青春!的博客
全部文章
(共184篇)
二叉树:编写一个函数void Exchange(BiTNode *bt)。函数功能:交换树中每个结点的左孩子和右孩子。
#include <stdio.h> #include <malloc.h> typedef struct BiTNode { int data; //关键字项 struct BiT...
2021-12-09
0
0
二叉树:编写一个函数int LeafSum(BiTNode *T)。函数功能:计算二叉树叶子结点的值的总和 。
#include <stdio.h> #include <malloc.h> typedef struct BiTNode { int data; //关键字项 struct BiT...
2021-12-09
0
0
求斐波那契数列的前几位?
#include<stdio.h> int fun(int m) { if(m==1||m==2){ //递归出口 return 1; }else{ //递归体 return fun(m-1)+fun(m-2); } } int main() { ...
2021-12-09
0
0
将整数转换为字符串。
#include<stdio.h> #include<string.h> void fun(int n) { char s[10]; char i=0,j; char *p,*q,t; while(n){ s[i++]=n%10+'0'; n/...
2021-12-09
0
0
求任意一个自然数n的立方均可写成n个连续奇数之和。
#include<stdio.h> int main() { int n,sum; int i,j; scanf("%d",&n); for(i=1;i<n*n*n;i+=2) { sum=0; for(j=i;j<...
2021-12-09
0
0
输入整数x,求它的每一位数值之和。
#include<stdio.h> #include<string.h> int fun(int m) { int sum=0; while(m) { sum+=m%10; m/=10; } return sum; } int main() ...
2021-12-09
0
0
数组:找出二维数组中既是行中的最大值又是列中的最小值的数值。
#include<stdio.h> int main() { int i,j,k; int n,m,max,min; int a[3][3]={ { 1,2,10},{ 4,5,6},{ 7,8,9}}; for(i=0;i<3;i++) ...
2021-12-09
0
0
数组:找出二维数组中最大值所在的行中的最小值的数值。
#include<stdio.h> int main() { int i,j,k,h=0; int n,m,max,min; int a[3][3]={ { 1,2,8},{ 4,5,6},{ 7,8,9}}; max=a[0][0]; for(...
2021-12-09
0
0
字符串:利用指针实现字符串反转。
#include<stdio.h> #include<string.h> void fun(char *a) { char *p,*q; char t; p=a; q=a+strlen(a)-1; while(p<q) { t=*p; ...
2021-12-09
0
0
字符串:用指针判断一个字符串是否为回文串。
#include<stdio.h> #include<string.h> int huiWen(char *p) { char *s,*e; int len=strlen(p); s=p;//地址赋值 e=p+len-1; while(*s==*e&...
2021-12-09
0
0
首页
上一页
1
2
3
4
5
6
7
8
9
10
下一页
末页