#include<stdio.h>
#include<stdlib.h>
#define MAXCOLS 80
#define TRUE 1
#define FALSE 0
void postfix(char*, char *);
int isoperand(char);
void popandtest(struct stack*, char*, int*);
int prcd(char, char);
void push(struct stack*, char);
char pop(struct stack*);
void main(){
char infix[MAXCOLS];
char postr[MAXCOLS];
int pos = 0;
while ((infix[pos++] = getchar()) != '\n' );
infix[--pos]='\0';
printf("%s%s", "the original infix expression is", infix);
postfix(infix, postr);
printf("%s\n", postr);
} /* end of main */
If You want to learn about the technology, computer science & engineering, web programming, freelancing, earning please click here :CSE SOLVE
#include<stdlib.h>
#define MAXCOLS 80
#define TRUE 1
#define FALSE 0
void postfix(char*, char *);
int isoperand(char);
void popandtest(struct stack*, char*, int*);
int prcd(char, char);
void push(struct stack*, char);
char pop(struct stack*);
void main(){
char infix[MAXCOLS];
char postr[MAXCOLS];
int pos = 0;
while ((infix[pos++] = getchar()) != '\n' );
infix[--pos]='\0';
printf("%s%s", "the original infix expression is", infix);
postfix(infix, postr);
printf("%s\n", postr);
} /* end of main */
0 comments:
Post a Comment