- 博客(18)
- 资源 (2)
- 收藏
- 关注
原创 C语言实现动态内存管理
#define _CRT_SECURE_NO_WARNINGS#include<stdio.h>#include<stdlib.h>#define n 5 /假定系统允许的最大作业为n,假定模拟实验中n值为10/#define m 5 /假定系统允许的空闲区表最大为m,假定模拟实验中m值为10/#define minisize 0struct{float a...
2019-12-10 22:07:44 339
原创 leetcode括号匹配问题
利用栈实现对字符串括号的匹配,每输入一个'{','(','['就压入一个对应的匹配括号,输入其他括号时则将对应的括号弹出与输入的括号进行比较判断 public static boolean isValid(String s) { Deque<Character> stack=new LinkedList<Character>(); char cs[]=s.toCharArray(); for(int i=0;i<cs.lengt
2020-10-17 10:39:53 176
原创 jdbc基础操作
配置文件driver=com.mysql.jdbc.Driverurl=jdbc:mysql://localhost:3306/test?useSSL=falseuser=rootpassword=******jdbcuimport java.io.IOException;import java.io.InputStream;import java.sql.*;import java.util.Properties;public class jdbcu {private static
2020-08-11 16:36:37 169
原创 java多线程查找文件内容
线程类public class findThread extends Thread {private String word;private File fbl;public findThread(File fbl, String word) throws FileNotFoundException { this.fbl = fbl; this.word = word;}public void run() { String s; FileReader fr = null; try {
2020-05-18 18:54:27 331
原创 隔一日问题
下面展示一些 内联代码片。// A code blockvar foo = 'bar';// An highlighted block#include "pch.h"#define _CRT_SECURE_NO_WARNINGS#include<iostream>using namespace std;bool isThirtyDay(int month) {//分类...
2020-05-06 13:59:01 748
原创 合并文件夹中文件
public class HeBin { public static void main(String[] args) throws IOException { //创建数据源目录File对象,路径是 File srcFolder = new File("d:/zd"); //创建目的地目录file对象,路径是模块名 Fi...
2020-04-24 21:07:17 154
原创 java递归查找一个文件目录下的最大最小文件(含子文件)
public class search {File minFile;File maxFile;long minlength = 10000;long maxlength = 0;public void searchFile(File f){ File[] fileList = f.listFiles(); if(fileList == null){ ret...
2020-04-24 16:24:31 412
原创 冒泡排序算法3种
#include<stdio.h>#include<stdlib.h>#includeint a[]={9,13,2,3,4,5,6,7,8,16,17,18,19};int length = sizeof(a) / sizeof(0);int num = 0;//统计的排序次数void sort(int a[]){for (int i = length -...
2019-12-26 23:15:59 97
原创 磁盘调度算法
c语言实现计算机系统磁盘调度算法:1.先来先服务算法2.最短寻道时间优先算法3.电梯算法#define _CRT_SECURE_NO_WARNINGS#include “cstdio”#include “string”#include “iostream”#include “algorithm”#include “cstring”#include"math.h"using name...
2019-12-17 17:21:44 208
原创 C语言实现词法识别
#define _CRT_SECURE_NO_WARNINGS#include<stdio.h>#include<string.h>#include<math.h>int main() {int i = 0, j, k = 0, state = 1, f = 0, linenum = 1;char a[11][10] = { “const”,“var...
2019-12-10 22:14:57 279
原创 8数码问题
#include#include#include<stdio.h>#include <stdlib.h>typedef int State[9];//定义状态类型const int maxstate = 1000000;State st[maxstate], goal;//状态数组,所有状态都保存在这里int dist[maxstate];//距离数组int...
2019-11-01 23:04:55 132
原创 数据结构c语言栈实现数制转化
#include<malloc.h>#include<stdio.h>#include<stdlib.h>#define STACK_INT_SIZE 100#define STACKINCREMENT 10int N, R;typedef int SElemType;typedef bool Status;typedef struct {...
2019-11-01 23:02:23 720
原创 C语言实现亚当姆斯方法
#include<stdio.h>#include<stdlib.h>double fx(double x, double y){return(y - 2 * x / y);}int main() {double x1, K1, K2, K3, K4, y1;double x0, y0, h,yx1,yx0,y2,y3,y4,x2,x3,x4,yp;int...
2019-04-01 14:20:09 671
原创 C语言实现改良版欧拉公式
#include<stdio.h>#include<stdlib.h>double fx(double x, double y){return(y - 2 * x / y);}int main() {double x1, yp, yc, y1;double x0, y0, h;int N;printf("请输入x0,y0,h,N:");scanf_s(...
2019-03-29 15:30:56 1594
原创 C语言实现非改良欧拉公式
#include<stdio.h>#include<stdlib.h>double fx(double x, double y){return(y - 2 * x / y);}int main() {double x1, y1;double x0, y0, h;int N;printf("请输入x0,y0,h,N:");scanf_s("%lf%lf%...
2019-03-29 15:29:40 464
原创 C语言实现4阶龙格库塔公式
#include<stdio.h>#include<stdlib.h>double fx(double x, double y){return(y - 2 * x / y);//书上的公式}int main() {double x1, K1, K2,K3,K4, y1;double x0, y0, h;int N;printf("请输入x0,y0,h,N...
2019-03-29 15:27:52 4146
原创 C语言实现拉格朗日插值
#include<stdio.h>#include<stdlib.h>int main() {int x[10], n;double y[10];int ax;double ay;printf(“请输入x与y的对数n:”);scanf_s("%d",&n);printf(“请输入x:”);scanf_s("%d", &ax);ay=0;...
2019-03-29 15:25:58 1415
原创 C语言实现牛顿插值公式
#include<stdio.h>#include<stdlib.h>int main() {int x[10], n;double y[10];int ax;double ay;double e;printf(“请输入x与y的对数n:”);scanf_s("%d", &n);printf(“请输入x:”);scanf_s("%d", &...
2019-03-29 15:24:01 1144
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人