首页    新闻    小组    威客    人才    下载    博客    代码贴    在线编程    论坛
代码贴随便看看全站
#include<stdio.h>
#define max 100000

struct sqlist
{
int data[max+1];
int lenth;
};

void shellinsert(sqlist *l,int d)
{
int i,j;
......................
阅读全部 | zhao72349947 贴于 2013年6月13日 16:33     hide bbsi
#include<stdio.h>
#define max 100000

struct sqlist
{
int data[max+1];
int lenth;
};

void shellinsert(sqlist *l)
{
int i,j,temp;
......................
阅读全部 | zhao72349947 贴于 2013年6月13日 16:33     hide bbsi
#include<stdio.h>
#define max 100000

struct sqlist
{
int data[max+1];
int lenth;
};

int patition(sqlist *l,int low,int high)
{
    l->data[0]=l->data[low];
......................
阅读全部 | zhao72349947 贴于 2013年6月13日 16:32     hide bbsi
#include<stdio.h>
#include<malloc.h>
#include<string.h>

struct node
{
char data;
int c;
node *lc,*rc,*pre;//左孩子为子女,右孩子为兄弟姐妹,pre父亲 
};

struct sqelist 
......................
阅读全部 | zhao72349947 贴于 2013年6月13日 16:30     hide bbsi
#include<stdio.h>
#include<string.h>
#define MAXSIZE 100

struct seqstack1//数据栈 
{
float data[MAXSIZE];//数组 
int top;//栈顶 
};
int init_seqstack1(seqstack1 * s1)//初始化栈 
{
s1->top=0;
......................
阅读全部 | zhao72349947 贴于 2013年6月13日 16:28     hide bbsi
#include<stdio.h>
#include<string.h> 
#include <malloc.h>

struct node  //结构体 
{
       int num;   //学号 
       char name[15];  // 姓名 
       int gs;   //高数成绩 
       int yy;   //英语成绩 
       int c;     //c语言成绩 
       node *next;//指针
......................
阅读全部 | zhao72349947 贴于 2013年6月13日 16:27     hide bbsi
#include<stdio.h>
#include<string.h>
#include<malloc.h>
struct node;
node *creat();//建立祖先
int add_child(node *head);//添加家庭成员
int add_brother(node *head);//添加兄弟成员
void print(node *head,char *x);//输出指定家庭成员
int beifen(node *p,char *x);//确定成员辈分
void print1(node *head);//先序遍历 输出家庭成员
void chengyuan(node *head,int s);//输出相应辈分成员
node *shanchu(node *head,char *s);//删除成员 
......................
阅读全部 | zhao72349947 贴于 2013年6月13日 16:20     hide bbsi
#include<stdio.h>
int main()
{
float p0=1000,r1=0.0036,r2=0.0225,r3=0.0198,p1,p2,p3;
p1=p0*(1+r1);
p2=p0*(1+r2);
p3=p0*(1+r3/2)*(1+r3/2);
printf("p1=%f\np2=%f\np3=%f\n",p1,p2,p3);
return 0;
}
阅读全部 | tigerball 贴于 2013年6月12日 21:12     hide bbsi
#include<stdio.h>
int main()
{
float f,c;
f=64.0;
c=(5.0/9)*(f-32);
printf("f=%f\nc=%f\n",f,c);
return 0;
}
阅读全部 | tigerball 贴于 2013年6月12日 20:54     hide bbsi
#include <stdio.h>
int main()
{
int sign=1;
double deno=2.0,sum=1.0,term;   //定义双精度类型的变量 
while (deno<=100)
{
sign=-sign;
term=sign/deno;
sum=sum+term;
deno=deno+1;
}
......................
阅读全部 | tigerball 贴于 2013年6月11日 20:41     hide bbsi
上一页 247 248 249 250 251 252 253 254 255 256 下一页