Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Write a description of class App here.
- *
- * @author Samuel Berkat Hulu
- * @version 5.0 21-April-2021
- */
- import java.io.*;
- public class App
- {
- public static void main(String[] args) throws IOException
- {
- String input, output;
- while(true)
- {
- System.out.print("Enter infix: ");
- System.out.flush();
- input = getString();
- if( input.equals("") )
- break;
- infixtopostfix theTrans = new infixtopostfix(input);
- output = theTrans.doTrans();
- System.out.println("Postfix is " + output + '\n');
- }
- }
- public static String getString() throws IOException
- {
- InputStreamReader isr = new InputStreamReader(System.in);
- BufferedReader br = new BufferedReader(isr);
- String s = br.readLine();
- return s;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement