- 博客(10)
- 资源 (9)
- 收藏
- 关注
原创 C语言基础--完美数
#include #include #include int perfectPrime(int a){int tmpVal=a;int sum=0;int flag=0;int arr[10]={0};int i=2,j=0,m=0;while(a%2==0){ a=a/2;arr[m++]=i;}w
2014-12-31 07:01:49 792
原创 C语言基础--分解质因素
#include "stdafx.h"#include #include #include int devidePrime(int a){int count=1;int flag=0;int i=2,j=0;static k=0;while(a%2==0){k++;if(k==1)printf("2"); else
2014-12-31 06:35:50 595
原创 C语言基础--输出数值的中文读法
#include #include #include void strdel(char*s,char del){int i;for(i=0;s[i];i++){if(s[i]==del)s[i] = 0;}}void printInChinese(int a){ char *s="";char * arr[10];int i=
2014-12-31 05:39:35 4539
原创 C语言基础--素数
#include #include int prime(int a,int b){int count=1;int flag=0;int sum=0;int i=2,j=0;while(count{ i++; int tmp=(int)sqrt(i); for(j=2;j2?tmp:2);j++){flag=1; if(i%j
2014-12-31 04:55:47 418
原创 列出叶节点(PAT3-2)
参考:http://www.patest.cn/contests/mooc-ds/03-2问题:03-2. List Leaves (25)时间限制400 ms内存限制65536 kB代码长度限制8000 B判题程序Standard作者CHEN, Yue
2014-12-24 04:06:47 4313 3
原创 二分法求多项式根
#include #include int a[4]; double c[2];double fun(double x){ return a[0]*x*x*x+a[1]*x*x+a[2]*x+a[3];}int main(int argc, char* argv[]){ int i; double x=10,x1=
2014-12-16 05:44:03 1161
原创 用堆栈把中缀表达式转化为后缀表达式,之后再求后缀表达式结果
红色部分为在上一篇文章上补充的部分#include "stdafx.h"#include #include #include #include #define MAXSIZE 100//转换中缀表达式用的符号(+-/*)堆栈,为了最后转换成后缀表达式链表用typedef struct Stack{int arr[MAXSIZE];int
2014-12-13 12:11:18 1277
原创 用堆栈把中缀表达式转化为后缀表达式
参考文章:http://www.cnblogs.com/mygmh/archive/2012/10/06/2713362.html中缀表达式转后缀表达式的方法:1.遇到操作数:直接输出(添加到后缀表达式中)2.栈为空时,遇到运算符,直接入栈3.遇到左括号:将其入栈4.遇到右括号:执行出栈操作,并将出栈的元素输出,直到弹出栈的是左括号,左括号不输出。5
2014-12-13 10:32:22 8587 1
原创 链表实现的多项式表达式(记住系数和指数)
#include #include #include #include //记住系数和指数typedef struct Node{int coef;int exp; struct Node *next;}Node;void printNode(Node* node){ if(node) { printf("%d ",node->coe
2014-12-13 08:44:46 1775
原创 最大子序列问题
最近在回顾数据结构,听了mooc的浙江大学的课程http://www.icourse163.org/learn/zju-93001#/learn/announce,第一课就是这个问题,觉得挺好的,就记录下来了,问题如下:Given a sequence of K integers { N1, N2, ..., NK }. A continuous subsequence is de
2014-12-05 03:06:02 770
2013_uboot_aston.txt
2020-05-24
uboot_116-linux2.6.32.7z
2012-09-11
jdbc——内嵌事务
2012-03-13
linux_0.11_bochs
2012-02-23
java数据结构
2011-12-31
jbpm4.4请假流程
2011-12-09
你好,我是jimmy,订阅你的“零基础驱动”。
2023-11-02
TA创建的收藏夹 TA关注的收藏夹
TA关注的人