Search:

Type: Posts; User: grache28

Search: Search took 0.00 seconds.

  1. Replies
    15
    Views
    2,962

    Ok, great. The problem is I only know how to get...

    Ok, great. The problem is I only know how to get input with cin. So I wouldn't have to make a lot of variables, or? How do I know how many variables to make?
  2. Replies
    15
    Views
    2,962

    What if I don't need the calculator to perform...

    What if I don't need the calculator to perform the correct order of operations, for example:

    5-3*5
    =10

    It just reads from left to right, but the amount of operators and operands is unknown. So...
  3. Replies
    15
    Views
    2,962

    Ok, thanks to you both. I'll work out a way to do...

    Ok, thanks to you both. I'll work out a way to do it with the Shunting-yard algorithm and come back if I have any problems.
  4. Replies
    15
    Views
    2,962

    Thanks, that looks like a good way of doing it,...

    Thanks, that looks like a good way of doing it, but probably a little more advanced than what I need. Theres no other way to adjust for multiple operators and operands?
  5. Replies
    15
    Views
    2,962

    Ok I got it working via a swtich that does this:...

    Ok I got it working via a swtich that does this:

    std::cin>> op1 >> opr >> op2;

    switch(opr){

    case '+':
    std::cout << op1+op2 << "\n";
    break;
  6. Replies
    15
    Views
    2,962

    doh *facepalm* Thanks

    doh *facepalm*

    Thanks
  7. Replies
    15
    Views
    2,962

    Simple Calculator (input problem)

    I'm trying to make a simple calculator, but it has to receive input like this:

    operand-operator-operand

    i.e.

    6*5
    76+2
    670/10
  8. Replies
    1
    Views
    915

    Product Order Program Help

    I've got to take an exam in a few days, and I've been studying exams from other years and theres one that is giving me a little trouble. I have an idea about how to write the code, but I think there...
Results 1 to 8 of 8