实验二

实验7

实验4 #include<stdio.h> int main() { FILE *fp; fp=fopen("d:\\data4.txt","r"); if(fp==NULL){ printf("fail to open file.\n"); return 1; } char ch; int cnt ......

实验七

task4 code #include <stdio.h> #include <string.h> #define N 5 #define M 80 int main() { char songs[N][M]; FILE* fp; fp = fopen("data1.txt", "r"); if ( ......

深入 K8s 网络原理(二)- Service iptables 模式分析

目录1. 概述2. 准备 Service 和 Pods 资源3. K8s 里 Service 的实现原理3.1 kube-proxy 组件3.2 iptables 简介3.3 iptables 规则3.3.1 Service,Pod 和 Host 信息3.3.2 从 NodePort 入手寻找 ip ......
iptables 原理 Service 模式 网络

实验七

任务一 代码 1 // 将图书信息写入文本文件data1.txt 2 3 #include <stdio.h> 4 5 #define N 80 6 7 typedef struct { 8 char name[N]; // 书名 9 char author[N]; // 作者 10 } Book; ......

实验7

task4 代码 1 #include<stdio.h> 2 3 int main() 4 { 5 FILE *fp; 6 fp=fopen("d:\\data4.txt","r"); 7 if(fp==NULL){ 8 printf("fail to open file.\n"); 9 retur ......

实验7 文件应用编程

task4 #define _CRT_SECURE_NO_WARNINGS 1 #include<stdlib.h> #include<stdio.h> #define N 100 int main() {FILE *fp; char n,*p; int count=0; fp=fopen("dat ......
文件

《重构:改善既有代码的设计》读书笔记二

二、代码的坏味道 1、Duplicated Code(重复代码) 坏味道首当其冲的就是Duplicated Code,如果你在一个以上的地点看到相同的重复结构,那么这个坏味道就可以确定了,设法将它们合而为一 同一个类中两个或更多的函数含有相同的表达式 利用Extract Method(提炼方法)提炼 ......
代码 笔记

通用定时器及定时器中断实验

定时器:顾名思义是用来定时的一个外设。stm32有八个定时器,分三类 计数器计数模式又分为三种:向上,向下,向上/下计数。 向上:计数器从零计数到自动加载值,然后重新从零开始并产生一个计数器溢出事件。 向下:计数器从自动加载值计数到零,然后重新从自动加载值开始并产生一个计数器溢出事件。 向上/下计数 ......
定时器

实验七

task4 #include <stdio.h> #include <string.h> #define N 5 #define M 80 int main() { char songs[N][M]; FILE* fp; fp = fopen("data1.txt", "r"); if (fp == ......

实验7

task.4 #include<stdio.h> int main(){ FILE *fp; int k = 0; char ch; fp = fopen("data4.txt","r"); if(fp == NULL) { printf("fail to open file\n"); return ......

实验七

task4.c 1 #include<stdio.h> 2 3 int main(){ 4 FILE *fp; 5 6 int k = 0; 7 char ch; 8 9 fp = fopen("data4.txt","r"); 10 11 if(fp == NULL) { 12 printf("f ......

实验7

#include<stdio.h> #define M 80 int main() { FILE *fp; char ch; fp = fopen("e:\\data4.txt","r"); if(fp == NULL) printf("fail to open file\n"); else { w ......

实验七

实验四 源代码 #include<stdio.h> #define M 80 int main() { FILE *fp; char ch; fp = fopen("e:\\data4.txt","r"); if(fp == NULL) printf("fail to open file\n"); ......

实验7 文件应用编程

实验任务4:文件简单应用 程序源码 1 #include<stdio.h> 2 3 int main(){ 4 FILE *fp; 5 long size; 6 int c; 7 int count = 0; 8 fp = fopen("C:\\data\\data4.txt", "rb"); 9 ......
文件

21_从中序与后序遍历序列构造二叉树

106. 从中序与后序遍历序列构造二叉树 给定两个整数数组 inorder 和 postorder ,其中 inorder 是二叉树的中序遍历, postorder 是同一棵树的后序遍历,请你构造并返回这颗 二叉树 。 示例 1: 输入:inorder = [9,3,15,20,7], postor ......
序列 从中 21

实验7

#define _CRT_SECURE_NO_WARNINGS #include<stdio.h> #include<stdlib.h> #include <stdio.h> #include <string.h> #define N 100 #define M 100 int main() { F ......

实验7 文件应用编程

task4 源代码 1 #include<stdio.h> 2 #include<stdlib.h> 3 4 int main(){ 5 FILE *fp; 6 char ch; 7 int cnt=0; 8 9 fp = fopen("d:\\date\\data4.txt","r"); 10 i ......
文件

实验七

4.任务4 #include <stdio.h> int main() { int i=0; char s; FILE *fp; fp=fopen("D:\\hhh\\data4.txt","r"); while(1){ s=fgetc(fp); if(s==EOF){ break; } else ......

实验7 文件应用编程

一,实验目的 二,实验准备 三,实验内容 1,实验任务1 task1_1.c 1 // 将图书信息写入文本文件data1.txt 2 3 #include <stdio.h> 4 5 #define N 80 6 7 typedef struct { 8 char name[N]; // 书名 9 ......
文件

实验7

task 4 源代码: 1 #include<stdio.h> 2 3 int main() 4 { 5 FILE *fp; 6 fp=fopen("d:\\data4.txt","r"); 7 if(fp==NULL){ 8 printf("fail to open file.\n"); 9 re ......

实验7

task4 代码 1 #include<stdio.h> 2 3 int main(){ 4 char ch; 5 int count=0; 6 FILE *fp; 7 8 fp=fopen("C:\\Users\\admin\\Desktop\\博客园\\实验7\\data4.txt","r"); ......

Python项目之ATM1.2多模块二版-json文件+功能完善

ATM1.2多模板二版 Github仓库(目前是私人) artistic-young-people/lea4ning (github.com) 功能介绍 func_menu = ''' ATM 1.注册 2.登录 3.激活银行卡 4.取款 5.转账 6.充值 7.个人日志 8.个人流水 9.个人信息 ......
功能完善 模块 功能 文件 项目

实验七

task.4 1.源代码 1 #include<stdio.h> 2 #include<stdlib.h> 3 #include <string.h> 4 int main() 5 { 6 char a; 7 int count=0; 8 FILE *fp; 9 fp = fopen("data4. ......

实验7

实验7 实验7.1.1源码 // 将图书信息写入文本文件data1.txt #include <stdio.h> #define N 80 typedef struct { char name[N]; // 书名 char author[N]; // 作者 } Book; int main() { ......

实验七

实验4 #include<stdio.h> int main() { char a; int count=0; FILE *fp; fp = fopen("data4.txt","r"); if(fp==NULL) { printf("fail to open\n"); return 1; } wh ......

实验七

#include<stdio.h> int main() { int s = 0; char ch; FILE* fp = fopen("data4.txt", "r"); if (fp == NULL) { printf("fail to open file\n"); return 1; } wh ......

docker常用命令日志记录(二)

1.拉取镜像 docker pull nginx 2.查看镜像 docker images [root@VM-8-2-centos ~]# docker images REPOSITORY TAG IMAGE ID CREATED SIZE nginx latest 605c77e624dd 24 ......
命令 常用 docker 日志

实验7

task4 源码 //统计文件中字符数(不包括空白符(空格、回车、tab键) #include<stdio.h> int main() { char ch; int count = 0; FILE *fp; fp = fopen("data4.txt", "r"); if(fp == NULL) { ......

实验7—文件应用编程

4、实验任务4 源代码 1 #include<stdio.h> 2 3 int main(){ 4 FILE *fp; 5 fp=fopen("d:\\data4.txt","r"); 6 if(fp==NULL){ 7 printf("fail to open file.\n"); 8 retur ......
文件

第七次实验

task4 #include<stdio.h> int main() { char ch; FILE *fp; fp = fopen("data4.txt","r"); int count = 0; while(1) { ch = fgetc(fp); if(ch==EOF) break; if(c ......