CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 7 of 7
  1. #1
    Join Date
    Feb 2013
    Posts
    3

    please help me now now now

    write a code in c# that
    Given a text, we need to look up the longest valid infix expression in the text and return its evaluation.

    The following expressions are a valid infix expressions:

    * a
    * a+b
    * (a/b)
    * (a + b) + (c) * a /c

    Input example:

    * “abcd 6 (4+3)*9yuy 6*((4+2)-(8-2))”

    Output:

    * 6 * ( ( 4 + 2 ) – ( 8 – 2 ) )
    * result : 0.
    ....................................................
    use stack and queu

  2. #2
    Arjay's Avatar
    Arjay is offline Moderator / EX MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    13,490

    Re: please help me now now now

    How far have you gotten with this homework assignment? Please post your code.

  3. #3
    Join Date
    Feb 2011
    Location
    United States
    Posts
    1,016

    Re: please help me now now now

    Helpful links:

    http://scriptasylum.com/tutorials/in...tfix/index.htm
    http://scriptasylum.com/tutorials/in...tion/index.htm

    On a sidenote, your subject line doesn't really inspire much desire to help you.
    Best Regards,

    BioPhysEngr
    http://blog.biophysengr.net
    --
    All advice is offered in good faith only. You are ultimately responsible for effects of your programs and the integrity of the machines they run on.

  4. #4
    Join Date
    Feb 2013
    Posts
    3

    Re: please help me now now now

    i don't have a time to write this code
    i shuold study for the exam
    if u can help me...please do it
    thanx my dear

  5. #5
    Join Date
    Feb 2013
    Posts
    3

    Re: please help me now now now

    i don't have a time to write this code
    i shuold study for the exam
    if u can help me...please do it
    thanx

  6. #6
    Arjay's Avatar
    Arjay is offline Moderator / EX MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    13,490

    Re: please help me now now now

    Quote Originally Posted by jak.lofy View Post
    i don't have a time to write this code
    i shuold study for the exam
    if u can help me...please do it
    thanx my dear
    Sorry, we don't have time to help.

  7. #7
    Join Date
    Feb 2011
    Location
    United States
    Posts
    1,016

    Re: please help me now now now

    And, in a more general sense, writing the code for you wouldn't help you learn.

    Occasionally, I think it IS highly instructive to teach by example, but it is surely not instructive, in this particular case. The links I provided above should help you understand the algorithm.
    Best Regards,

    BioPhysEngr
    http://blog.biophysengr.net
    --
    All advice is offered in good faith only. You are ultimately responsible for effects of your programs and the integrity of the machines they run on.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured