![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
c语言
文章平均质量分 74
xingliyuan22
这个作者很懒,什么都没留下…
展开
-
函数指针的例子(自己的作业)
<br />#include<stdio.h><br />#include<stdlib.h><br />typedef double (* INTEGRAL)(double);<br />double integral_1(double x)<br />{<br /> double y;<br /> y = x*x/2 + x*x*x/3;<br /> return y;<br />}<br />double integral_2(double x)<br />{<br /> double y;<br /原创 2011-05-10 09:02:00 · 378 阅读 · 0 评论 -
一道狐狸找兔子的题
<br />Ø围绕着山顶有10个圆形排列的洞,狐狸要吃兔子,兔子说:“可以,但必须先找到我,我就藏身于这十个洞中的某个洞。你从1号洞找,下次隔1个洞(即3号洞)找,第三次隔2个洞(即6号洞)找,再隔3个…以后在这个圆圈中如此类推,次数不限。”但狐狸从早到晚进进出出了1000次,仍没有找到兔子。Ø问兔子究竟藏在哪个洞里?自己编的程序:#include<stdio.h>#define NUM 10const int count=1000;void main(void){int i;int curr = 0;in原创 2011-04-20 19:58:00 · 955 阅读 · 0 评论 -
编一个程序,完成64位数据(无符号)的加法、减法运算。不允许直接使用64位的数据类型。(未完成)
#include #include typedef struct Num_64{long low;long high;}Num_64;Num_64 Add_64(Num_64 a, Num_64 b);Num_64 Sub_64(Num_64 a, Num_64 b);void main(){Num_64 a;Num_64 b;Num_64 result;a.high = 0x01111111;a.low = 0xcccc1111;b.high = 0xcccc1111;b.low = 0xcccc1111原创 2011-04-25 17:02:00 · 2922 阅读 · 0 评论 -
链表的基数排序,随机产生十个数,按基数排序排序(代码通过vs2005编译运行)
#include #include #include #define RADIX 10 /*关键字基数*/#define NUM 10 /*链表节点个数*/typedef struct LNode /*链表节点定义*/{int data; /*存放的数据*/struct LNode *next; /*指向下一个节点的指针*/}LNode,* LinkList;LinkList CreateLink(LNode L[NUM原创 2011-04-25 18:47:00 · 855 阅读 · 0 评论