2023年12月23日
摘要: 2023/11/4 简单看完翁恺C语言入门后的一些难点 经典的素数打印,以及观察改良后的代码,还有构造素数表 二进制的补码很关键,理解了它就能理解字节的知识 8个字节的二进制数的范围,加了unsigned就非负且乘二了,还加了有形象的图说明超过那个范围就会回环往复,inf表示无穷,nan表示不存在 阅读全文
posted @ 2023-12-23 19:37 lulixiu 阅读(3) 评论(0) 推荐(0) 编辑
摘要: 1.插入排序 #include"stdio.h" #define N 5 int main() { //1 2 3 4 5 //2 1 3 4 5 int a[N]={1,2,3,4,5},i,j,tmp; for(i=1;i<N;i++) { j=i-1; tmp=a[i]; while(a[j] 阅读全文
posted @ 2023-12-23 19:35 lulixiu 阅读(2) 评论(0) 推荐(0) 编辑
摘要: 头歌作业 回文判断 #include <stdio.h> #include <string.h> #define MAX_LEN 80 int IsReverse(const char *str); int main(void) { char str[MAX_LEN]; printf("Input 阅读全文
posted @ 2023-12-23 19:35 lulixiu 阅读(52) 评论(0) 推荐(0) 编辑
摘要: 结构体 声明结构体变量的四种方式 1.先定义结构体,再声明结构体变量 struct student{ long number; char name[20]; char sex; float score; };//先定义结构体 struct student s1,s2;//声明结构体变量 2.在定义结 阅读全文
posted @ 2023-12-23 19:34 lulixiu 阅读(14) 评论(1) 推荐(0) 编辑
摘要: 必学工具 vim编辑器 emacs编辑器 进阶,git github开源社区 GNU Make提升效率 Cmake更抽象 让排版自动专业Latex 轻量级虚拟机docker 配环境节省时间scoop 日常工作学习流 Obsidian ,其中Annotator笔记能跳转到原文,Anki生成卡片链接 电 阅读全文
posted @ 2023-12-23 19:33 lulixiu 阅读(17) 评论(0) 推荐(0) 编辑
摘要: 函数篇 编写一个函数,可以实现给出算数运算的功能,给出两个值以及算数运算符号可以算出相应的结果 #include<stdio.h> int math(int a,int b,char c);//开头声明一个自己定义的函数 int main() { int a,b,c,sum; printf("请输入 阅读全文
posted @ 2023-12-23 19:33 lulixiu 阅读(31) 评论(0) 推荐(0) 编辑