- 博客(6)
- 收藏
- 关注
原创 最小的十位素数
<br /> <br /> <br /> <br /> <br /> <br /> <br />#include "stdafx.h"#include "stdio.h"#include "malloc.h"#include "math.h"unsigned int data[70000];int isP(unsigned int x){ unsigned int k,q; q = (unsigned int )(sqrt((long double)x));
2010-07-16 16:04:00
975
原创 行列式的定义计算
<br />#include "stdafx.h"#include "iostream"#include <stdio.h>#include <string.h>#include <malloc.h>using namespace std;void prt(double *p, int n){ int i; for(i = 0; i < n*n; ++i) { if(i%n == 0) printf("/n"); cout << p[i] <<
2010-06-12 16:28:00
1202
原创 字符串转换为整数
#include int check(char *s){ char *p; p = s; if((s[0] != +) || (s[0] != -) ||(*p > 9) ||(*p < 0)) { } else { return 0; } while(*(++p) != /0) { if((*p > 9)
2010-01-23 18:39:00
357
原创 用链表来模拟堆栈
#include "stdafx.h"#include "malloc.h"#include "stdio.h"#include "iostream"struct s_node { int data; struct s_node *next;};typedef struct s_node node;typedef struct s_node* li
2009-08-06 13:52:00
361
原创 555555的最大的三位数的约数
#include "stdafx.h"#include "stdio.h"#include "iostream"typedef unsigned int uint;int a[32];int k = 2;void f(uint i, int j) //递归产生的 i 的所有约数 存放在 数组a 中{ if( i == 1) return ;
2009-08-03 00:08:00
1536
原创 用数组表示堆栈的练习。
#include "stdafx.h"#include"stdio.h"#define N 10int stack[N];int top;int f;int push(int data){ if(top >= N-1) { puts("/npush error"); return (-1); } else { top++;
2009-08-01 16:58:00
451
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人