Menu

Mathematic problem

Anonymous
2016-09-22
2016-09-30
  • Anonymous

    Anonymous - 2016-09-22

    I have noticed in PC-BASIC that raising a number to a power of another number appears to cause a syntax error. I.E., PRINT 2**3 does not result in 8. Is there a different operand to use or does this mathematical function not work?

     
  • Rob Hagemans

    Rob Hagemans - 2016-09-22

    Hi, the exponentiation operator is ^, so PRINT 2^3 will give what you are looking for. Have a look at http://pc-basic.org/doc/#operators for more information.

    Hope this helps,
    Rob