Complex input getting

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bvmpriya
    New Member
    • Jul 2008
    • 8

    Complex input getting

    Hi Friends,
    If any one know the answer please reply as soon as possible.
    In my program i want to get three input values seperated by spaces(not on seperate lines), at the same time i want to check my second input value whether it was a character or an interger.
    If it was a character then i dont want to get the third input and directly it must go to a function,
    Else if the second input was an integer value means then it must go to another function meant for that....
    Actually this is a program specification for a calculator program.....
    the input format must be like this:
    4 7 /
    and
    4 S (for finding the square value)
    so for this it wont get the third value

    Thanks in Advance.
    If you have any doubt in the specification please feel free to ask.

    Priya
  • sicarie
    Recognized Expert Specialist
    • Nov 2006
    • 4677

    #2
    So you can read in the line as a string and parse it by the delimiting spaces.

    Are you going to be using C or C++ for this?

    Comment

    • bvmpriya
      New Member
      • Jul 2008
      • 8

      #3
      Originally posted by sicarie
      So you can read in the line as a string and parse it by the delimiting spaces.

      Are you going to be using C or C++ for this?
      Thanks for your reply
      I'm doing it in C
      i tried that pgm and got it...
      But the thing is i am getting the inputs in different lines....
      I want to get that in a single line.....
      I still have some specifications like checking for alphabets, if there are any operators other than * + - / , S and R
      so need an idea for that....If possible reply me
      if u want i can send u that part of code.....

      Thanks in Advance

      Comment

      • sicarie
        Recognized Expert Specialist
        • Nov 2006
        • 4677

        #4
        How are you currently getting the line?

        Comment

        Working...