Skip to content

Instantly share code, notes, and snippets.

[
{
"id": "b6b5f313a70d78c2",
"type": "tab",
"label": "流程3",
"disabled": false,
"info": ""
},
{
"id": "b630ef5a75522127",
@Jeremywu0109
Jeremywu0109 / stack.cpp
Last active October 25, 2021 15:14
中序轉前序運算式
#include <iostream>
#include <iomanip>
#include <string>
using namespace std;
void inToPostfix(char*, char*);
int priority(char);
int main()
{
int max = 100, len = 0;
#include <iostream>
using namespace std;
int main(int argc, char** argv)
{
int a[5]={0}, i = 0, x;
for (i = 0; i <= 4;i++)
{
cout << "Integer" << i+1 << ":";
cin >> x;