Jump to content

  • Log In with Google      Sign In   
  • Create Account

calculator app


Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
4 replies to this topic

#1   Members   

215
Like
0Likes
Like

Posted 11 May 2013 - 08:32 PM

I am building a very simple little calculator app., Let me know if I need to add anything. I am only using +,-,*,/ operators and the numbers 0 to 9.

I am using c# and a windows form.

here is the logic I am using.

 

1) start

2) input number X

3) input operator

4) input number Y

5) calculate S = X (operator) Y

6) output S

7) end

 

 



#2   Members   

3097
Like
1Likes
Like

Posted 11 May 2013 - 10:10 PM

A simple thing to add is a way to assign S to X, and choose another operator and Y to perform a new operation based on the result of the last. I wouldn't really say you need to add anything to the logic, since it is a GUI for some of the most basic things a machine can do, but as a learning experience, here is a path you could try to expand what you know.



#3   Members   

13102
Like
1Likes
Like

Posted 12 May 2013 - 04:31 AM

Yes, that is right.


“If I understand the standard right it is legal and safe to do this but the resulting value could be anything.”


#4   Members   

215
Like
0Likes
Like

Posted 12 May 2013 - 12:44 PM

cool so I am on the right track?



#5   Members   

300
Like
1Likes
Like

Posted 13 May 2013 - 01:01 AM

Here is something to think about. What if I enter in:

7 + (6 × 52 + 3)

 

http://www.mathsisfun.com/operation-order-bodmas.html






Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.