Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class PostfixCalculator {
- public static void calculator(String [] posfix){
- String current = "";
- char c;
- for (int i = 0; i < posfix.length; i++){
- current = posfix[i];
- c = current.charAt(0);
- if (c >= '0' && c <= '9'){
- }
- }
- }
- public static void main (String [] args) {
- infix_to_postfix infix = new infix_to_postfix();
- String string = "";
- Scanner scanner = new Scanner(System.in);
- while (true) {
- string = scanner.nextLine();
- String[] infixS = string.split(" ");
- calculator(infix.infix_to_postfix(infixS).split(" "));
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement