Search:

Type: Posts; User: Norm

Search: Search took 0.14 seconds.

  1. Replies
    4
    Views
    2,070

    [SOLVED] Re: How to convert from string to math sign

    To do addition use the +: x + y
    to do subtraction use the -: x - y
    etc


    if(str.equals("+")) // test the string
    val = x + y; // do the math operation
    else id(str.equals("-"))
    ...
  2. Replies
    4
    Views
    2,070

    [SOLVED] Re: How to convert from string to math sign

    Use an if statement to test the value of the String to see what it is.

    The code will have to have the math operations in it already and use the value of the String to determine which operation to...
Results 1 to 2 of 2