This code is running fine .. i want to rewrite this code in order to ask the user for input and then coverth it from infex to postfix ,, so i want to put a Scanner and this ask the user for input .. how to do it ?
public static void main(String[] args)
throws IOException {
String input = "((3*4)+6)/2";
String output;
infix2postfix theTrans = new infix2postfix(input);
output = theTrans.doTrans();
System.out.println("Postfix is " + output + '\n');
}
This code is running fine .. i want to rewrite this code in order to ask the user for input and then coverth it from infex to postfix ,, so i want to put a Scanner and this ask the user for input .. how to do it ?
public static void main(String[] args)
throws IOException {
String input = "((3*4)+6)/2";
String output;
infix2postfix theTrans = new infix2postfix(input);
output = theTrans.doTrans();
System.out.println("Postfix is " + output + '\n');
}