2012年11月3日

将数组元素全排列后输出每个排列结果

摘要: #include <iostream>#include <malloc.h>///////////////////////////char *ary; //数组指针////////////////////////////////////////////////void init_ary(int n); //数组个数void srt_l_h(int n); //将数组按值从小到大排列void srt_a_b(char *a, char *b); //交换a,bint find_srt(int n); //找到待排序的位置并进行排序void print(int n); // 阅读全文

posted @ 2012-11-03 18:49 timeflies 阅读(631) 评论(0) 推荐(1)

二维热传导离散数值解

摘要: Crank_Nicolson.h#include <GL/glut.h> #include <stdio.h> #include <stdlib.h>#include <iostream>#include <malloc.h>#include <math.h>int xnseg_ = 100;int ynseg_ = 100;int tnseg_ = 100;struct Heat { double u[101][101];};struct Heat heat[101];struct Heat_h { double u_h 阅读全文

posted @ 2012-11-03 12:52 timeflies 阅读(733) 评论(0) 推荐(0)

导航