Thread: Simple Calculator By C

  1. #1
    Registered User
    Join Date
    Jun 2011
    Posts
    1

    Simple Calculator By C

    Hi guys
    i want a C program that makes a simple calculator that do the following operations :
    Add
    Subtract
    Multiply
    Division
    Power

    the calculator MUST calculate in one line for example :
    6^3*5/10+2-4
    and MUST follow the ORDER OF OPERATIONS and that is the most important point cause i tried to make the calculator but i couldn't make the order of operations

    and thaaaanks very much

  2. #2
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,336
    This is a reasonably well-traveled path; you should probably look up "shunting yard algorithm".

  3. #3
    Registered User
    Join Date
    May 2011
    Location
    Around 8.3 light-minutes from the Sun
    Posts
    1,949
    Let's see where would be a good place to start? Oh wait I know.....

    The homework policy.

    No one here is going to do your work for you. If you have a specific question, ask it with the relevant code. And let's not forget for all future endeavors, google is your friend.
    Quote Originally Posted by anduril462 View Post
    Now, please, for the love of all things good and holy, think about what you're doing! Don't just run around willy-nilly, coding like a drunk two-year-old....
    Quote Originally Posted by quzah View Post
    ..... Just don't be surprised when I say you aren't using standard C anymore, and as such,are off in your own little universe that I will completely disregard.
    Warning: Some or all of my posted code may be non-standard and as such should not be used and in no case looked at.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. simple calculator
    By symcy in forum C Programming
    Replies: 2
    Last Post: 02-05-2011, 12:04 PM
  2. simple calculator
    By yacek in forum C Programming
    Replies: 10
    Last Post: 10-07-2010, 05:24 AM
  3. very simple calculator
    By N_D_E in forum C Programming
    Replies: 4
    Last Post: 03-22-2010, 07:18 PM
  4. simple calculator
    By HunterCS in forum C++ Programming
    Replies: 10
    Last Post: 07-18-2007, 06:51 AM
  5. simple calculator
    By Micko in forum C++ Programming
    Replies: 4
    Last Post: 08-12-2005, 06:47 AM