C++ Assignment

This is a discussion on C++ Assignment within the C++ Programming forums, part of the General Programming Boards category; Below is my lab assignment. Can anyone help? Write a program to perform a simple calculation for addition, subtraction, multiplication, ...

  1. #1
    Unregistered
    Guest

    C++ Assignment

    Below is my lab assignment. Can anyone help?

    Write a program to perform a simple calculation for addition, subtraction, multiplication, and division with the following conditions:

    1. The program shall read a command line form a file of commands & print out the output.
    2. The input file is the following:
    ADD 2,3
    SUBTRACT 5,2
    MULTIPLY 2,5
    DIVIDE 10,2

    Thanks

  2. #2
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,796
    What do you have as a solution so far?

    -Prelude
    My best code is written with the delete key.

  3. #3
    Registered User rmullen3's Avatar
    Join Date
    Nov 2001
    Posts
    330
    ;_; I'm tired of people posting their assignment and expecting people to write it for them...

  4. #4
    the hat of redundancy hat nvoigt's Avatar
    Join Date
    Aug 2001
    Location
    Hannover, Germany
    Posts
    3,138
    This might help, especially the second post.
    hth
    -nv

    She was so Blonde, she spent 20 minutes looking at the orange juice can because it said "Concentrate."

    When in doubt, read the FAQ.
    Then ask a smart question.

  5. #5
    Registered User
    Join Date
    Mar 2002
    Posts
    1,595
    Do you know how to read from a file?

    Do you know how to use enumerated types, or strcmp(), or some other method whereby you can convert the word in the command line into an action?

  6. #6
    Registered User
    Join Date
    Dec 2001
    Posts
    421
    have you done ANYTHING at all by yourself??

    The only thing you will achieve by writing a "please do my assignment for me" post is annoying the hell out of people.

    Make some effort to do it yourself, and post specific questions when you have problems. This forum is designed to help people figure out specific things, not to let complete morons like yourself post assignment questions and not have to do any work by themselves.

    If you THINK about it, you might just realise how simple it is!!
    Quidquid latine dictum sit, altum sonatur.
    Whatever is said in Latin sounds profound.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Menu
    By Krush in forum C Programming
    Replies: 17
    Last Post: 09-01-2009, 02:34 AM
  2. Assignment Operator, Memory and Scope
    By SevenThunders in forum C++ Programming
    Replies: 47
    Last Post: 03-31-2008, 06:22 AM
  3. Screwy Linker Error - VC2005
    By Tonto in forum C++ Programming
    Replies: 5
    Last Post: 06-19-2007, 02:39 PM
  4. Help with a pretty big C++ assignment
    By wakestudent988 in forum C++ Programming
    Replies: 1
    Last Post: 10-30-2006, 08:46 PM
  5. Replies: 1
    Last Post: 10-27-2006, 01:21 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21