frisa 的 站内主页
2008
09-13
09-13
想用函数递归实现分割法排序,首先对于数组的第一个元素,求出它在最终排序完之后的位置,即将大于它全排在它的右边,小于它的排在左边。再对被他分割而成的两个小数组实行相同操作,但总觉得递归用得有问题但又找不出在哪儿?请大家指教
#include <stdio.h>void Quicksort(int *num,int start....
Read More >
以下这段代码的功能是求两个数的最公约数,但是只对较小的数起作用,上了几千就明显出错,谁帮忙看看#include<stdio.h>int maxy(int a,int b){ int c,d; c=a>b?a:b; d=a<=b?a:b; ....
Read More >
2008
08-31
08-31
我要做的是通过往末尾添加节点来建立链表,然后在输出,但是有问题,谁帮我看一下
#include <stdio.h>#include <stdlib.h>struct am{ char name[10]; struct am *th;};
struct am *add(struct am *head){ int i=0; char ....
Read More >