自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(11)
  • 收藏
  • 关注

原创 给定两个有序链表的头指针head1和head2,打印两个链表的公共部分。

用两个指针指向两个链表的第一的节点,哪一个的数值小,这个指针就往后移一位。两个数相等时,打印这个数并且两个指针同时后移,当某一个指针为空时结束循环。

2023-03-29 19:59:07 211

原创 双链表--java

【代码】双链表--java。

2023-03-28 20:47:05 159 1

原创 单链表的创建---java

【代码】单链表的创建---java。

2023-03-28 20:40:53 1667

原创 冒泡排序法

#include <stdio.h>main(){ int i,j,t,a[10]; printf("请输入10个数:"); for(i=0;i<10;i++) scanf("%d",&a[i]); for(j=0;j<9;j++) { for(i=0;i<9-j;i++) if(a[i]>a[i+1]) { t=...

2019-11-15 20:16:16 179

原创 有一个整数数组,其中存放着序列1,3,5,7,9,11,13,15,17,19。请将该序列倒序存放并输出。

#include <stdio.h>#include <stdlib.h>/* run this program using the console pauser or add your own getch, system("pause") or input loop */int main(int argc, char *argv[]) { int a[10]=...

2019-11-14 19:11:58 7332

原创 *

#include <stdio.h>#include <math.h>main(){ int i,j,k; for(i=-3;i<=3;i++) { k=abs(i); for(j=1;j<=10+k;j++) printf(" "); for(j=1;j<=7-2*k;j++) printf("*"); printf(...

2019-11-12 19:53:17 113

原创 *

#include <stdio.h>#include <stdlib.h>/* run this program using the console pauser or add your own getch, system("pause") or input loop */int main(int argc, char *argv[]) { int i,j; ...

2019-11-12 19:08:33 131

原创 求2~100之内的素数

#include <stdio.h>main(){ int i,j; for(i=2;i<=100;i++) { for(j=2;j<=i-1;j++) if(i%j==0) break; if(i==j) printf("%d\n",i); }}

2019-11-09 19:51:36 580

原创 .3000米长的绳子,每天减一半。问多少天这个绳子会小于5米?不考虑小数。

#include <stdio.h>main(){ int l; int day; for(l=3000;l>=5;day++) l=l/2; printf("%d",day); }

2019-11-06 22:41:25 1944

原创 验证五的倍数

#include <stdio.h>main(){ int i=5,n; printf("请输入:"); scanf("%d",&n) ; if(n%5==0) printf("%d",n); }

2019-11-06 22:26:05 739

原创 九九乘法表

#include <stdio.h>main(){int i,j;for(i=1;i<=9;i++){for(j=1;j<=i;j++)printf("%d*%d=%-5d",i,j,i*j);printf("\n");}}

2019-11-05 19:28:54 105

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除