Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


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 phil67rpg   Members   -  Reputation: 100

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

 

 



Sponsor:

#2 Ectara   Crossbones+   -  Reputation: 3089

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 Bacterius   Crossbones+   -  Reputation: 10326

Like
1Likes
Like

Posted 12 May 2013 - 04:31 AM

Yes, that is right.


The slowsort algorithm is a perfect illustration of the multiply and surrender paradigm, which is perhaps the single most important paradigm in the development of reluctant algorithms. The basic multiply and surrender strategy consists in replacing the problem at hand by two or more subproblems, each slightly simpler than the original, and continue multiplying subproblems and subsubproblems recursively in this fashion as long as possible. At some point the subproblems will all become so simple that their solution can no longer be postponed, and we will have to surrender. Experience shows that, in most cases, by the time this point is reached the total work will be substantially higher than what could have been wasted by a more direct approach.

 

- Pessimal Algorithms and Simplexity Analysis


#4 phil67rpg   Members   -  Reputation: 100

Like
0Likes
Like

Posted 12 May 2013 - 12:44 PM

cool so I am on the right track?



#5 jellyfishchris   Members   -  Reputation: 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.



PARTNERS