Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- *App
- *Samuel Berkat Hulu
- *Version 5.0 ETS Struktur Data
- *
- */
- import java.io.*;
- 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;
- Ifikstopostfiks theTrans = new Ifikstopostfiks(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