Thread: Calculator prog.

  1. #1
    Registered User
    Join Date
    Mar 2009
    Posts
    1

    Calculator prog.

    Hi I'm trying to write a calculator program (w/basic arithmetic -=x%) that reads numbers from a file and writes the results to another file. File names that are specified by the user at runtime. For Example;

    Enter input file name: numbers.txt

    Enter output file name: results.txt

    Specify operation: *

    Specify operand: 3
    Done

    If the file numbers.txt contains: 2 8 3 0 4 4 1

    then the file results.txt should contain: 6 24 9 0 12 12 3

    Could someone help me here?

    thanks in advance!
    Last edited by Lima_3; 03-26-2009 at 10:30 AM. Reason: incomplete question

  2. #2
    Hurry Slowly vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,788
    Quote Originally Posted by Lima_3 View Post

    Could someone help me here?
    Someone could definitely help.

    But you have to do something first.

    Read Forum Guidelines and Homework Policy

    Then write some code.

    And if you encounter problems - post code, problem description (compiler errors for example) and ask concrete question
    All problems in computer science can be solved by another level of indirection,
    except for the problem of too many layers of indirection.
    – David J. Wheeler

Popular pages Recent additions subscribe to a feed

Tags for this Thread