2
3
(3-4)
1
((1+2)/(3-4))
(1+2)
Source Code
#include<stdio.h>
if(exp[j]>='0' && exp[j]<='9')
#include<list>
{
#include<string>
temp.assign(1,exp[j]);
#include<iostream>
//string a(char *temp);
using namespace std;
opn.push_back(temp);
int main () }
{ if(exp[j]== '+' || exp[j]=='-' || exp[j]=='*' ||
int n,x; exp[j]=='/')
char exp[1000],c1,c2,c3; {
string temp,temp2; temp2.assign(1,exp[j]);
list <string> opn;
string s1,s2,s3; s3=opn.back();opn.pop_back();s2=opn.back();opn.po
string kb; p_back();
string kt(")"); kb+=s2;kb+=temp2;kb+=s3;kb+=kt;
opn.push_back(kb);
scanf("%d", &n); }
for(int i=0;i<=n;i++) }
{ //printf("%s\n", kb);
gets(exp); cout<<kb<<endl;
x=strlen(exp); }
for(int j=0;j<x;j++)
{ system("pause");
kb="("; return 0;
if(exp[j]>='0' && exp[j]<='9‘) }