把字符串里指定的字母改成指定的值。 用二维数组或者结构体。一开始使用的string字符串,但切割成数组的时候可能出现问题导致一个点过不去。 所以还是用结构体吧。 题目本身不难。 1 #include <iostream> 2 #include <cstdio> 3 #include <algorit ...
分类:
其他好文 时间:
2019-12-29 22:06:18
阅读次数:
90
#include <stdio.h> #include <stdlib.h> #include <string.h> const int N = 10; // 定义结构体类型struct student,并定义其别名为STU typedef struct student { long int id; ...
分类:
其他好文 时间:
2019-12-29 18:40:06
阅读次数:
53
// 从文本文件file1.dat中读取数据,找出最高分和最低分学生信息,并输出在屏幕上 #include <stdio.h> #include <stdlib.h> #define N 10 // 定义一个结构体类型STU typedef struct student { int num; cha ...
分类:
其他好文 时间:
2019-12-29 18:35:53
阅读次数:
68
网络安全编程期末复习 第一章 绪论 计算机网络三要素 独立功能的计算机 外围设施(连接设备,传输介质) 网络协议 应用层 表示层 会话层 | 传输层 | 网络层 | 数据链路层 物理层 应用层 传输层 tcp udp 网络层 icmp igmp ip 链路层 arp rarp 第二章 网络层主要协议 ...
分类:
其他好文 时间:
2019-12-29 16:57:57
阅读次数:
96
消息队列 消息队列即消息的链表,存放于内核并由消息队列标识符表示。是Linux进程通信机制中常见的一种通信方式,常用来在不同进程间发送特定格式的信息数据。linux支持POSIX消息队列与System V消息队列,本文阐述后者,详可见:https://www.cnblogs.com/linuxbug ...
分类:
系统相关 时间:
2019-12-29 16:39:19
阅读次数:
116
1.冒泡排序 1 #include <stdio.h> 2 int main(){ 3 int i,j,n,temp; 4 int a[100]; 5 while(scanf("%d",&n)!=EOF){ 6 for(int i=0;i<n;i++){ 7 scanf("%d",&a[i]); 8 ...
分类:
其他好文 时间:
2019-12-29 15:05:44
阅读次数:
73
1. #include <stdio.h> #include <stdlib.h> #include <string.h> const int N = 10; // 定义结构体类型struct student,并定义其别名为STU typedef struct student { long int ...
分类:
其他好文 时间:
2019-12-29 13:02:42
阅读次数:
64
#include <stdio.h> #include <stdlib.h> #include <string.h> const int N = 10; // 定义结构体类型struct student,并定义其别名为STU typedef struct student { long int id; ...
分类:
其他好文 时间:
2019-12-29 12:43:35
阅读次数:
47
一、学习 1.在命令行中输入 进行查看 2.在命令行中输入 进行查看 二、伪代码 1.指定文件名filename; 2.定义stat结构体,调用stat()函数,将filename中的信息储存再stat结构体中; 3.用原点标记符得到stat中的属性,并用printf将其输出。 三、产品代码 四、运 ...
分类:
其他好文 时间:
2019-12-29 11:23:15
阅读次数:
81
具体看实例: 1 #include <iostream> 2 using namespace std; 3 //定义一个第一人称游戏的人物角色的结构体 4 struct NPC { 5 char Name[20]; 6 int age; 7 bool sex;//男=0,女=1 8 }; 9 int ...
分类:
其他好文 时间:
2019-12-29 11:01:55
阅读次数:
74