C语言
‘Endeavor
这个作者很懒,什么都没留下…
展开
-
C语言练习题库
写一个程序,输入为一个整数,输出为该整数的打头数字。例如123的打头数字为1,-123的打头数字为-1。**输入格式要求:"%d" 提示信息:“请输入一个整数:”**输出格式要求:“该整数以%d打头!\n”#include<stdio.h>#include<stdlib.h>#include<math.h>int main(){ int ...原创 2019-05-30 15:59:47 · 9257 阅读 · 0 评论 -
双向循环链表小改进
//双向循环链表#include<stdio.h>#include<Stdio.h>#include<windows.h>typedef struct node{int data;struct node *next, *pre;}link;//生成该链表link *creat(link *head,int n){link *p, q;/...原创 2019-10-08 11:40:24 · 130 阅读 · 0 评论 -
C语言/数据结构
建立一个双向循环链表#include<stdio.h>#include<stdlib.h>int n=5;typedef struct node{ int data; struct node *next, *pre;}link;link *creat(link *head){ link *p, *q; head = (lin...原创 2019-10-08 11:25:15 · 91 阅读 · 0 评论 -
C语言·倒置一个单链表
#include<stdio.h>#include<stdlib.h>typedef struct node{ int data; struct node *next ;}link;link *creat(int n){ link *p= NULL , *s=NULL, *head =NULL; head = (link *)m...原创 2019-10-07 21:56:11 · 538 阅读 · 0 评论 -
C语言/数据结构·单链表
同样这个代码 是根据我对书上代码的理解写的对书上一些没必要的步骤进行了删减#include<stdio.h>#include<stdlib.h>struct link{ int data; struct link *next;};struct link *Append(struct link *head){ struct link *...原创 2019-10-06 21:09:29 · 169 阅读 · 0 评论 -
C语言游戏2.1.2
#include<stdio.h>#include<stdlib.h>int x , y ;int h , w ;int bx, by;void start(){ h =20; w = 30; x =0; y=0; bx=0; by=y;}void show(){ system("cls"); ...原创 2019-07-03 23:22:59 · 138 阅读 · 0 评论 -
C语言游戏2.1.2
#include<stdio.h>#include<stdlib.h>int x , y ;int h , w ;int bx, by;void start(){ h =20; w = 30; x =0; y=0; bx=0; by=y;}void show(){ system("cls"); ...原创 2019-07-03 23:21:45 · 624 阅读 · 0 评论 -
C语言游戏2.1.1
#include<stdio.h>#include<stdlib.h>#include<conio.h>int x , y ;int h , w ;void startup(){ h =20; w=30; x=0; y=0;}void show(){ system("cls"); int ...原创 2019-07-03 22:55:22 · 109 阅读 · 0 评论 -
C语言基础·练习系统
编写一个程序打印如下对称图形(行数由键盘输入1-9范围的值),例如下面是输入数字4时的情形:首先提示输入:“Enter n(1-9):\n”输入格式:"%d"(提醒:每一行数字结束后直接回车,没有空格)例如:Enter n(1-9):44444444333332221222333334444444#include<stdio.h>#include<s...原创 2019-06-18 19:00:13 · 921 阅读 · 0 评论 -
弹跳的小球
这段代码是我在书上学的,但是我感觉它里面一些细节不太利于理解,所以也做了一些改动,但是算法都是一样的。我是C语言菜鸟,我们专业对C语言也要求不高,现在都是平时感兴趣写一下,所以有不好的地方请大家包含,也感谢指出其实这个程序对于小白来说,应该就是怎么 输出小球的位置 比较困难。 这个可以参考我之前写的一个 用 * 打印菱形 的博文就是我了,点我就对了#include<stdio....原创 2019-05-28 18:46:55 · 372 阅读 · 0 评论 -
双向循环链表 查找元素或元素指针
查找元素如果看不懂 建议去看看我的 单链表加油 入门后简直快活//**双向循环链表 查找元素或元素指针**#include<stdio.h>#include<Stdio.h>typedef struct node{ int data; struct node *next, *pre;}link;//生成该链表link *creat...原创 2019-10-08 12:01:06 · 673 阅读 · 0 评论