Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

A Simple calculator

Status
Not open for further replies.

unixisbest

Technical User
Jul 11, 2005
28
0
0
Hi all,
I don`t know much about java but i would like to create a simple calculator for complex numbers. Operator and operands will be entered using a keyboard, results will be printed into the standart output.The application will ask user after every computation, if that wants to perform another computation.

Any idea?
 
from javaalmanac.com
Code:
try {
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        String str = "";
        while (str != null) {
            System.out.print("> prompt ");
            str = in.readLine();
            process(str);
        }
    } catch (IOException e) {
    }

_________________
Bob Rashkin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top