-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtemp
More file actions
42 lines (41 loc) · 1.06 KB
/
temp
File metadata and controls
42 lines (41 loc) · 1.06 KB
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
2 3 3 4 2 3 5 4 1 3 5 4
// char* str = "233423541354.143543524352+2342314123413.34523453-321341241.12341234*3423121212.234523232323324324325423*(73729494719444.4239508234+41341312415454524.123787970473713980712477421675184631)";
//
// int i = 0;
// pOperand topOperand = NULL;
// pOperand topOperator = NULL;
// pExpression topExpression = NULL;
//
// while(1)
// {
// if(str[i] == NULL)
// {
// break;
// }
//
// if(str[i] == 46)
// {
// pushOperand(&topOperand, -1);
// }
//
// else if((48 <= str[i] && str[i] <= 57))
// {
// pushOperand(&topOperand, str[i] - '0');
// }
//
// else if((str[i] == 42) || (str[i] == 43) || (str[i] == 45) || (str[i] == 47))
// {
// pushOperator(&topOperator, str[i]);
// pushExpression(&topExpression, &topOperand);
// topOperand = NULL;
// }
//
//
//
// i++;
// }
//
// for(int i = 0; i < 100; i++)
// {
// printf("%d", popOperand(&topOperand));
// }