• Post Reply Bookmark Topic Watch Topic
  • New Topic

My java calculator does not give the expected output ! !!?  RSS feed

 
Ammar Salem
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, ranchers, i have been trying to make a simple java calculator,which is suppose to perform the basic Addition ,Multiplication,Subtraction,and Division, but the only result i am getting is for Addition.No other options are shown, i cant see the menu i coded.
please, i appreciate if you can have a look at my codings and comment.
thank you.
here is my code:
***************************************************

**************************************
[ January 09, 2008: Message edited by: Ammar Salem ]
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JavaRanch tip:

If you surround your posted code with code tags
it will be a lot easier for people to read your code; meaning that you will stand a better chance of someone answering your question.

You can go back and add them by clicking the link in the top post of this thread.
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24217
38
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Perhaps in main() you'd like to call optionSelected() to start off?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!