forked from Manish57-droid/python
- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDSA2.cpp
More file actions
Latest commit
28 lines (18 loc) · 325 Bytes
/
Copy pathDSA2.cpp
File metadata and controls
28 lines (18 loc) · 325 Bytes
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
#include<bits/stdc++.h>
usingnamespacestd;
#definesize50
intmain(){
int i,j;
char infix[100],postfix[100];
cout<<"enter infix expression"<<endl;
cin>>infix;
i=0;
while(infix[i++]!='\0');
infix[i+1]='\0';
infix[i--]=')';
while(i>0){
infix[i]=infix[i-1];
}
infix[i]='(';
return0;
}