summaryrefslogtreecommitdiffstats
path: root/4/10.c
blob: baa6546fb2003b1b5196386fbdf177d2a53493db (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#include <stdio.h>
#include <string.h>

#define MAXOP 100
#define MAXLINE 1000

#define NUM '0'
#define FUN '1'
#define ASG '2'
#define VAR '3'

int getop(char[]);
void push(double);
double peek();
double pop();
void clear();

int main(int argc, char *argv[]) {
  int type;
  char s[MAXOP];

  while (type == getop(s)) {
    switch (type) {
    case NUM:
      break;
    case '+':
      break;
    case '-':
      break;
    case '*':
      break;
    case '/':
      break;
    case '%':
      break;
    case FUN:
      break;
    case ASG:
      break;
    case VAR:
      break;
    default:
      printf("error: unknown command %s\n", s);
    }
  }

  return 0;
}