urgent help needed

Discussion in 'C++' started by Gohar, May 7, 2006.

  1. Gohar

    Gohar Guest

    Any one please send me the C++ code for arithmatic calculator using
    linked lists
    Which performs addition ,subtraction,multiplication,division and
    modulus(using operator overloading).
    i need it badly,urgently before monday
    please send it to my mail address
    i shall be thankful ,
    Regards
     
    Gohar, May 7, 2006
    #1
    1. Advertising

  2. Gohar

    Rolf Magnus Guest

    Gohar wrote:

    > Any one please send me the C++ code for arithmatic calculator using
    > linked lists
    > Which performs addition ,subtraction,multiplication,division and
    > modulus(using operator overloading).


    No.

    > i need it badly,urgently before monday


    Then you should start writing it immediately.

    > please send it to my mail address


    How about you tell us your teacher's mail address? Then someone can send it
    directly to him/her.
     
    Rolf Magnus, May 7, 2006
    #2
    1. Advertising

  3. Gohar

    Rolf Magnus Guest

    Gohar wrote:

    > Any one please send me the C++ code for arithmatic calculator using
    > linked lists
    > Which performs addition ,subtraction,multiplication,division and
    > modulus(using operator overloading).


    No.

    > i need it badly,urgently before monday


    Then you should start writing it immediately.

    > please send it to my mail address


    How about you tell us your teacher's mail address? Then someone can send it
    directly to him/her.
     
    Rolf Magnus, May 7, 2006
    #3
  4. Gohar

    utab Guest

    I am sorry but no one will write the code to help you and send it to
    your e-mail address. Rolf Magnus replied with a nice option:

    How about you tell us your teacher's mail address? Then someone can
    send it
    directly to him/her.

    I liked that.

    Regards
     
    utab, May 7, 2006
    #4
  5. Gohar wrote:
    > Any one please send me the C++ code for arithmatic calculator using
    > linked lists
    > Which performs addition ,subtraction,multiplication,division and
    > modulus(using operator overloading).
    > i need it badly,urgently before monday
    > please send it to my mail address
    > i shall be thankful ,
    > Regards


    I think I have something you can start with. How much are you willing to
    pay for it? I'll sell it to you for a special price: €150,- How does
    that sound?

    LOL :)

    I can't believe so many lazy students I see post questions about 1-2
    days before they should hand in their solution to an assignment, when
    they've probably had more than a week at least to try to do something
    and begin working on the exercise.


    Best regards / Med venlig hilsen
    Martin Jørgensen

    --
    ---------------------------------------------------------------------------
    Home of Martin Jørgensen - http://www.martinjoergensen.dk
     
    =?windows-1252?Q?Martin_J=F8rgensen?=, May 7, 2006
    #5
  6. Gohar

    Salt_Peter Guest

    "Gohar" <> wrote in message
    news:...
    > Any one please send me the C++ code for arithmatic calculator using
    > linked lists
    > Which performs addition ,subtraction,multiplication,division and
    > modulus(using operator overloading).
    > i need it badly,urgently before monday
    > please send it to my mail address
    > i shall be thankful ,
    > Regards
    >


    Answer:
    Write a program that calculates the number of times Monday happens during
    any given year, including leap years. Use a linked list to store a
    month-by-month breakdown of the number of times Monday occurs using integers
    and percentages. Output the data using a std::eek:fstream to a file. Provide an
    interface to read/load the dataset using a std::ifstream and compare the
    dataset with a user's input year. Display the result.
     
    Salt_Peter, May 8, 2006
    #6
  7. "Gohar" <> wrote in message
    news:...
    > Any one please send me the C++ code for arithmatic calculator using
    > linked lists
    > Which performs addition ,subtraction,multiplication,division and
    > modulus(using operator overloading).
    > i need it badly,urgently before monday
    > please send it to my mail address
    > i shall be thankful ,


    I have no idea what such code might look like in C++ and my Delphi version
    doesn't support operator overloading. But the guts of what you ask for
    might look something like the following in D5.


    Type
    pStackRec = ^ tStackRec;
    tStackRec = record
    rValue : double;
    rLink : pStackRec;
    end;
    tCalcOp = (add, subtract, multiply, divide, modulo);

    var CalcStack : pStackRec = nil;

    procedure PushStack (val : double);

    var p : pStackRec;

    begin
    New (p);
    p^.rLink := CalcStack;
    CalcStack := p;
    p^.rValue := val;
    end;

    function PopStack : double;

    var p : pStackRec;

    begin
    if CalcStack <> nil
    then result := CalcStack.rValue
    else raise Exception.Create ('Stack underflow');
    p := CalcStack;
    CalcStack := CalcStack^.rLink;
    Dispose (p);
    end;

    function StackCalc (op : tCalcOp) : double;

    var p : pStackRec;

    begin
    if CalcStack = nil
    then raise Exception.Create ('Emtpy Stack');
    p := CalcStack;
    result := 0.0;
    if op in [add .. modulo]
    then begin // two operands required
    CalcStack := CalcStack^.rLink;
    if CalcStack = nil
    then raise Exception.Create ('Missing operand');
    case op of
    add : result := CalcStack^.rValue + p^.rValue;
    subtract : result := CalcStack^.rValue - p^.rValue;
    multiply : result := CalcStack^.rValue * p^.rValue;
    divide : result := CalcStack^.rValue / p^.rValue;
    modulo : result := CalcStack^.rValue - ((CalcStack^.rValue /
    p^.rValue) * p^.rValue);
    end;
    Dispose (p);
    CalcStack^.rValue := result;
    end;
    end;
     
    Bruce Roberts, May 8, 2006
    #7
  8. Gohar

    Markus Humm Guest

    Gohar schrieb:
    > Any one please send me the C++ code for arithmatic calculator using
    > linked lists
    > Which performs addition ,subtraction,multiplication,division and
    > modulus(using operator overloading).
    > i need it badly,urgently before monday
    > please send it to my mail address
    > i shall be thankful ,
    > Regards
    >

    Hello,

    first of all you should convince your teacher that the assignement is to
    be done on Pascal or Delphi. You surely wanted to do this anygow didn't
    y? Or why would you otherwise write to two not relevant newsgroups?

    Another thing: you should tell us how much you'd pay us for a solution
    (at least a fundamental one) and how much for a really working solution.

    To further simplyfy the task, your should - as already mentiones - send
    us the e-mail address of your teacher, then we can deliver much more
    faster and are sure that nothing gets lost during transmission.

    You also should show us the source you've already programmed for this
    assignement.

    Another question: what school are you in or what do you study?

    Oh and btw: hurry up, the less the time the more the price for our
    work...(yes economics is hard)

    Greetings

    Markus
     
    Markus Humm, May 8, 2006
    #8
  9. Gohar wrote:

    > Any one please send me the C++ code for arithmatic calculator using
    > linked lists


    So you are:
    - too lazy to do your homework yourself
    - too computer-illiterate to do an internet search for a solution
    - too ignorant even to know the difference between C++ and Pascal.

    Duuuh!
     
    Dr Engelbert Buxbaum, May 12, 2006
    #9
  10. Dr Engelbert Buxbaum wrote:
    > Gohar wrote:
    >
    > > Any one please send me the C++ code for arithmatic calculator using
    > > linked lists

    >
    > So you are:
    > - too lazy to do your homework yourself
    > - too computer-illiterate to do an internet search for a solution
    > - too ignorant even to know the difference between C++ and Pascal.
    >
    > Duuuh!


    and you love feeding the trolls :(
     
    Diego Martins, May 12, 2006
    #10
  11. Try the TDatetimepicker and pick a date three weeks ago.
    That should give you plenty of time.
    O well, too late now....



    "Diego Martins" <> schreef in bericht
    news:...
    >
    > Dr Engelbert Buxbaum wrote:
    >> Gohar wrote:
    >>
    >> > Any one please send me the C++ code for arithmatic calculator using
    >> > linked lists

    >>
    >> So you are:
    >> - too lazy to do your homework yourself
    >> - too computer-illiterate to do an internet search for a solution
    >> - too ignorant even to know the difference between C++ and Pascal.
    >>
    >> Duuuh!

    >
    > and you love feeding the trolls :(
    >
     
    Sander Martens, May 17, 2006
    #11
  12. Gohar

    Jim P Guest

    Bruce Roberts wrote:
    > "Gohar" <> wrote in message
    > news:...
    >
    >>Any one please send me the C++ code for arithmatic calculator using
    >>linked lists
    >>Which performs addition ,subtraction,multiplication,division and
    >>modulus(using operator overloading).
    >>i need it badly,urgently before monday
    >>please send it to my mail address
    >>i shall be thankful ,

    >
    >
    > I have no idea what such code might look like in C++ and my Delphi version
    > doesn't support operator overloading. But the guts of what you ask for
    > might look something like the following in D5.
    >
    >
    > Type
    > pStackRec = ^ tStackRec;
    > tStackRec = record
    > rValue : double;
    > rLink : pStackRec;
    > end;
    > tCalcOp = (add, subtract, multiply, divide, modulo);
    >
    > var CalcStack : pStackRec = nil;
    >
    > procedure PushStack (val : double);
    >
    > var p : pStackRec;
    >
    > begin
    > New (p);
    > p^.rLink := CalcStack;
    > CalcStack := p;
    > p^.rValue := val;
    > end;
    >
    > function PopStack : double;
    >
    > var p : pStackRec;
    >
    > begin
    > if CalcStack <> nil
    > then result := CalcStack.rValue
    > else raise Exception.Create ('Stack underflow');
    > p := CalcStack;
    > CalcStack := CalcStack^.rLink;
    > Dispose (p);
    > end;
    >
    > function StackCalc (op : tCalcOp) : double;
    >
    > var p : pStackRec;
    >
    > begin
    > if CalcStack = nil
    > then raise Exception.Create ('Emtpy Stack');
    > p := CalcStack;
    > result := 0.0;
    > if op in [add .. modulo]
    > then begin // two operands required
    > CalcStack := CalcStack^.rLink;
    > if CalcStack = nil
    > then raise Exception.Create ('Missing operand');
    > case op of
    > add : result := CalcStack^.rValue + p^.rValue;
    > subtract : result := CalcStack^.rValue - p^.rValue;
    > multiply : result := CalcStack^.rValue * p^.rValue;
    > divide : result := CalcStack^.rValue / p^.rValue;
    > modulo : result := CalcStack^.rValue - ((CalcStack^.rValue /
    > p^.rValue) * p^.rValue);
    > end;
    > Dispose (p);
    > CalcStack^.rValue := result;
    > end;
    > end;
    >
    >

    Why do this the hard way.

    I showed a 10 year old kid how to do this in VB and then in Delphi.

    Just put some edit boxes on the form.

    and some buttons - - click a button does selected task. Cheap, Simply
    and educational. The kid and friends played with it for hours - to the
    mothers surprise. and the kid did the coding.

    No stack or anything like that - - - but it worked and was a lesson for
    the kid.

    but then again this sounds like a home work assignment. - - -

    Jim P
     
    Jim P, Jun 2, 2006
    #12
  13. "Jim P" <> wrote in message
    news:...

    > Why do this the hard way.


    Because that is what was asked for.

    > I showed a 10 year old kid how to do this in VB and then in Delphi.
    >
    > Just put some edit boxes on the form.
    >
    > and some buttons - - click a button does selected task. Cheap, Simply and
    > educational. The kid and friends played with it for hours - to the
    > mothers surprise. and the kid did the coding.


    Except that this solution cannot handle out of order evaluation, e.g. 5 + 6
    * 7, with correct operator precedence. Glad the kids had fun learning
    something new.
     
    Bruce Roberts, Jun 3, 2006
    #13
  14. Gohar

    Jamie Guest

    Bruce Roberts wrote:

    > "Jim P" <> wrote in message
    > news:...
    >
    >
    >>Why do this the hard way.

    >
    >
    > Because that is what was asked for.
    >
    >
    >>I showed a 10 year old kid how to do this in VB and then in Delphi.
    >>
    >>Just put some edit boxes on the form.
    >>
    >>and some buttons - - click a button does selected task. Cheap, Simply and
    >>educational. The kid and friends played with it for hours - to the
    >>mothers surprise. and the kid did the coding.

    >
    >
    > Except that this solution cannot handle out of order evaluation, e.g. 5 + 6
    > * 7, with correct operator precedence. Glad the kids had fun learning
    > something new.
    >


    that is why you need a globel number and operator stack with a recursive
    evaluation function.
    done that! been there before!



    --
    Real Programmers Do things like this.
    http://webpages.charter.net/jamie_5
     
    Jamie, Jun 4, 2006
    #14
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. andy

    urgent help needed !

    andy, Jul 12, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    932
  2. Ramki
    Replies:
    2
    Views:
    524
    Digitlcoup
    Feb 10, 2004
  3. Brahmam

    Urgent help needed.............

    Brahmam, Apr 7, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    436
    Brahmam
    Apr 7, 2006
  4. Peter Row
    Replies:
    0
    Views:
    490
    Peter Row
    Mar 1, 2004
  5. Alap Ghosh

    Redirect Blues - Urgent Help needed

    Alap Ghosh, Jun 10, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    328
    Alap Ghosh
    Jun 10, 2004
Loading...

Share This Page