自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创

[root@localhost ~]# ! /bin/bashcase "$1" in[root@localhost ~]# case "$1" in> start)> echo "Starthing ABC service"> ;;> stop)> echo "Stop ABC service"> ;;> force-relonad|...

2019-12-22 21:53:46 126

原创 Linux第三次

[root@localhost ~]# lsdos hello.c[root@localhost ~]# mkdir vitest[root@localhost ~]# lsdos hello.c vitest[root@localhost ~]# mkdir ~/vitest/inittab[root@localhost ~]# lsdos hell...

2019-12-22 21:24:03 118

原创 linux第二次

[root@localhost ~]# find / -name lib -print >> test[root@localhost ~]# lsdos hello.c test[root@localhost ~]# head test/var/lib/lib/usr/local/lib/usr/lib/usr/lib/perl5/5.22.2/unicor...

2019-12-22 20:54:48 135

原创 图形用户界面编辑

package texet;import javax.swing.*;import java.awt.*;public class text extends JFrame {public text(){this.setTitle("第一个界面");this.setBounds(300, 300, 600, 450);this.setDefaultCloseOperation(thi...

2019-12-06 16:32:54 172

原创 java异常处理

package maxt;public class asdd { public static void main(String[] args){ try{ int a=args.length; System.out.println("\na = "+ a); int b=42/a; int c[]={1}; c[42]=99; }catch(Arithm...

2019-11-22 16:16:28 87

原创 linux第一次实验

[root@localhost ~]# pwd/root[root@localhost ~]# mkdir -p ~/home/jxnc[root@localhost ~]# cd home[root@localhost home]# lsjxnc[root@localhost home]# cd ~[root@localhost ~]# lsdos hello.c h...

2019-10-29 11:35:56 162

原创 线性表

#include<stdio.h>#include<stdlib.h>void ListInitiate(SeqList *L){L->size=0;}int ListLength(SeqList L){return L.size;}int ListInsert(SeqList *L,int i,DataTye x){int j;if(L-&g

2019-10-25 17:24:56 87

原创 将两个有序单链表合并

#include<stdio.h>#include<stdlib.h>#include<malloc.h>typedef struct node*List;struct node{int data;struct node *next;};List Read(){int x;List q,r ,head;scanf_s("%d",&...

2019-10-25 17:24:34 101

原创

#include<stdio.h>#include<stdlib.h>typedef char DataType;typedef int SeqList;#define MaxSize 10#define MaxVertices 10#define MaxWeight 10000typedef struct{ SeqList Vertices; int ...

2019-10-25 17:23:55 80

原创 遍历二叉树

#include<stdio.h>#include<stdlib.h>#include<math.h>#define MAX_TREE_SIZE 100#define OK 1#define OFFOR 0typedef TElemType SqBiTree[MAX_TREE_SIZE];SqBiTree bt;typedef int Statu...

2019-10-25 17:23:36 85

原创 普利莫算法

.cpp#include<stdio.h>#include<stdlib.h>#define Maxsize 10#define MaxVertices 10#define MaxEdges 100#define MaxWeight 1000#define MaxQueueSize 10typedef char DataType;typedef char ...

2019-10-25 17:23:06 237

原创 归并排序

void Merg(datatype a[], int n,datatype swap[],int k) { //归并排序 int m = 0, u1, u2, i, j, l2; int l1 = 0; while (l1 + k <= n - 1) { l2 = l1 + k; u1 = l2 - 1; u2 = (l2 + k - 1 <= n - 1...

2019-10-25 17:22:31 80

原创 java静态成员和实例成员

package asdm;public class Texdt { static int nStance; private static int nInstance; public static int getStatic(){ return nStance; } public static void setStatic(int newX){ nInstance=newX;...

2019-10-15 11:35:24 414

原创 创建Java类

package asdm;public class Texdt { private int nInstance; public String getInstance; public int getInstance(){ return nInstance; } public void setInstance(int newY){ nInstance=newY; }}cla...

2019-10-15 11:18:41 120

原创 Java的Math类

package asdm;import java.util.Random;public class Texdt { public static void main(String[] args){ Random r1=new Random(1234567890L); Random r2=new Random(1234567890L); boolean b=r1.nextBool...

2019-10-15 10:55:56 114

原创 java的枚举类型

package asdm;enum Color{ RED, GREEN, BLUE;}public class Texdt { public static void main(String[] args){ showColor(Color.RED); } public static void showColor(Color color){ switch(color){ ...

2019-10-15 10:35:32 99

原创 Java字符串

package text;class asdf { private String str; public String getStr(){ return str; } public void serStr(String str){ this.str=str; } public String reverse(String s){ int len=s.length(); ...

2019-10-11 17:30:43 101

原创 Java二维数组行、列互换

package text;public class asd { public static void main(String args[]){ int array[][]={{2,3,4},{5,6,7}}; int a[][]=new int[3][2]; System.out.println("源数组输出:"); for(int i=0;i<array.length...

2019-10-11 17:12:36 1798 1

原创 输出二维数组每行的列数

package text;public class asd { public static void main(String[] args){ int[][] a={ {1,2,3,4,5}, {2,3,4,5}, {3,4,5}, {4,5}, {5}}; System.out.println("the length of a is"+a.l...

2019-10-11 16:55:37 764

原创 数组名之间的复制

package text;public class asd { public void output(String arrayName,int temp[]){ int i; for(i=0;i<temp.length;i++){ System.out.println(arrayName +"["+i+"]="+temp[i]); } } public stati...

2019-10-11 16:46:56 91

原创 Java数列【Fibonacci 数列前十个数】

package text;public class asd { public static void main(String[] args){ int i; int f[]=new int[10]; f[0]=1; f[1]=1; for(i=2;i<f.length;i++){ f[i]=f[i-1]+f[i-2]; } for(i=1;i<=...

2019-10-11 16:29:48 1298

原创 java时间类

package aad;import java.text.*;import java.util.*;import java.text.DateFormat;public class gj { public static void main(String args[]){ Date today; DateFormat f1, f2; String s1; String s2...

2019-10-08 10:42:01 181

原创 顺序查找and排序and折半查找

#include<stdio.h>#include<stdlib.h>int searchItem(int arr[],int len, int value){ int low = 0,high = len-1,mid; while (low <= high) { mid = (low + high)/2; if ...

2019-06-03 15:07:57 180

原创 矩阵相乘以及转置

#include<stdio.h>#include<stdlib.h>int main(){ int a[3][3],b[3][3],c[3][3]; int i,j,k; printf("please input a:"); for(i=0;i<3;i++){ for(j=0;j<3;j++){ scanf_s("%d",&a[i...

2019-05-06 14:58:48 4177 1

原创 串的取子以及插入

#include<stdio.h>#include<string.h>#include<stdlib.h>#include<malloc.h>typedef char Elemtype;typedef int Status;typedef struct {Elemtype *ch; //指针域,指向存放串值的存储空间基址 i...

2019-04-23 20:39:53 149

原创 c++

#include#includeusing namespace std;int main(){int i=1;do{int j=1,k=1;do{cout<<" “;j++;}while(j<=9-i);do{cout<<”*";k++;}while(k<=i);cout<<endl;i++;}while(i<...

2019-03-25 17:09:01 106 1

原创 c++十六进制转十进制

#include#include&amp;amp;lt;math.h&amp;amp;gt;#include#includeint main(){using namespace std;string s;int i=0,count,sum;while(getline(cin,s)){int count=s.length();sum=0;for(i=count-1;i&amp;amp;gt;=0;i–){if(s[i]&amp

2019-03-11 17:08:50 614 1

原创 c++十进制转十六进制

十六进制转十进制#include#includeint main(){using namespace std;int i=0,n,m,num[100];char hex[16]={‘0’,‘1’,‘2’,‘3’,‘4’,‘5’,‘6’,‘7’,‘8’,‘9’,‘A’,‘B’,‘C’,‘D’,‘E’,‘F’};cout&amp;amp;lt;&amp;amp;lt;“please a number.”&amp;amp;lt;&amp;amp;lt;.

2019-03-11 17:08:08 35440 8

原创 起泡法

#include&amp;lt;stdio.h&amp;gt;#include&amp;lt;stdlib.h&amp;gt;#include&amp;lt;string.h&amp;gt;char str[10];int main(){void sort(char[]);int i,flag;for(flag=1;flag==1;){printf(“input string:\n”);scanf(&quot;%

2018-12-12 11:10:10 1195 1

原创 小错误

简单实验,粗心造成失误#include&amp;amp;amp;amp;lt;stdio.h&amp;amp;amp;amp;gt;#include&amp;amp;amp;amp;lt;stdlib.h&amp;amp;amp;amp;gt;int main(){int a, b, n;int sum = 0;printf(“输入a的值和位数n:”);scanf_s(&amp;amp;amp;quot;%d,%d&amp;am

2018-11-25 20:42:32 161

原创 c小姐的爱宠——c语言笔记

我的c语言笔记——或与且&amp;amp;&amp;amp;表示且,一假全假||表示或,一真全真在c语言逻辑里,先运行非(!)后且(&amp;amp;&amp;amp;)再或(||)a为真,b为真,a&amp;amp;&amp;amp;b为真,a||b为真a为真,b为假,a&amp;amp;&amp;amp;b为假,a||b为真a为假,b为假,a&amp;amp;&amp;amp;b为假,a||b为假

2018-11-18 00:03:49 228

原创 (一)补充篇

**回文数(正确判断方法)****#include&lt;stdio.h&gt;#include&lt;stdlib.h&gt;int main(void){int a, b;int sum = 0;scanf_s("%d", &amp;a);b = a;while (b){sum = sum * 10 + b % 10;b = b / 10;}****if (sum...

2018-11-10 10:23:02 1344

原创 我的c语言(一)

我的c语言 (first)回文数:#include&amp;lt;stdio.h&amp;gt;#include&amp;lt;stdlib.h&amp;gt;int main(void){int a, b;int sum = 0;scanf_s(&quot;%d&quot;, &amp;amp;a);b = a;while (b){sum = sum * 10 + b % 10;b = b / 10

2018-11-09 22:29:33 349

空空如也

空空如也

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

TA关注的人

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