mawe

导航

2012年8月4日 #

整数中缀表达式求值

摘要: #include<stdio.h>#include<stdlib.h>#define MAX 50typedef struct{ char data[MAX]; int top;}stack;typedef struct{ float data[MAX]; int top;}fstack;stack* create(){ stack *s; s=malloc(sizeof(stack)); s->top=-1; return s;}fstack* fcreate(){ fstack *s; s=malloc(sizeof(fstack)); s->top=- 阅读全文

posted @ 2012-08-04 00:28 ma1076492641 阅读(200) 评论(0) 推荐(0) 编辑

两个任意长度整数的加减乘除

摘要: #include<stdio.h>#include<string.h>#include<math.h>#define MAX 100void jia(char aa[],char bb[],int n,int m){ int i,temp=0,j; int a[MAX]={0},b[MAX]={0}; int c[MAX]={0}; for(i=n-1,j=0;i>=0;i--,j++) a[j]=aa[i]-'0'; for(i=m-1,j=0;i>=0;i--,j++) b[j]=bb[i]-'0'; if(n 阅读全文

posted @ 2012-08-04 00:18 ma1076492641 阅读(457) 评论(0) 推荐(0) 编辑