上一页 1 ··· 5 6 7 8 9
摘要: 1 #include<stdio.h> 2 #include<stdlib.h> 3 4 struct chain 5 { 6 int num; 7 float score; 8 struct chain *next; 9 }; 10 11 //创建新链表 12 struct chain *crea 阅读全文
posted @ 2016-02-29 11:47 启云 阅读(287) 评论(0) 推荐(0) 编辑
摘要: 游程编码问题请实现游程编码的编码函数和解码函数。提示:游程编码的概念是, 给一块数据,如:0x11 0x11 0x11 0x22 0x33 0x33 0x33 0x33 0x33, 那么游程编码的结果是:0x11 0x3 0x22 0x1 0x33 0x5 //主函数 1 #include <std 阅读全文
posted @ 2016-02-29 11:25 启云 阅读(637) 评论(0) 推荐(0) 编辑
摘要: 判断两个字符串的大小 1 #include <stdio.h> 2 3 int my_strcmp(const char *str1,const char *str2) 4 { 5 //判断两个字符串是否为空 6 if((str1 == NULL) && (str2 == NULL)) 7 { 8 阅读全文
posted @ 2016-02-29 11:16 启云 阅读(561) 评论(0) 推荐(0) 编辑
摘要: 实现两个字符串相连 1 #include<stdio.h> 2 #include<string.h> 3 4 //把源字符串连接到目的字符串中 5 char *strcat1(char *dest,const char *src) 6 { 7 int i=0; 8 int n=strlen(dest 阅读全文
posted @ 2016-02-29 10:23 启云 阅读(297) 评论(0) 推荐(0) 编辑
摘要: 输入一个整数,将各位数字反转后输出 1 #include <stdio.h> 2 #include <stdlib.h> 3 4 int inversion(unsigned int num) 5 { 6 int ret=0; //定义返回值 7 int remainder; //定义一个余数 8 阅读全文
posted @ 2016-02-29 10:16 启云 阅读(3323) 评论(0) 推荐(0) 编辑
摘要: 猴子第一天摘下N个桃子,当时就吃了一半,还不过瘾,就又吃了一个。第二天又将剩下的桃子吃掉一半,又多吃了一个。 以后每天都吃前一天剩下的一半零一个。到第10天在想吃的时候就剩一个桃子了,求第一天共摘下来多少个桃子? 1 #include<stdio.h> 2 3 int main() 4 { 5 un 阅读全文
posted @ 2016-02-29 10:02 启云 阅读(186) 评论(0) 推荐(0) 编辑
上一页 1 ··· 5 6 7 8 9