c++ help

spamdos

New Member
okay so im relatively new to c++ and i have created a few simple programs but i am stumped. i want to raise a number to the power of another number. but the ^ button will not let me do this all i have figured out is to square a number any help?

result=first^second; wont let me use the ^ operation
 
spamdos said:
okay so im relatively new to c++ and i have created a few simple programs but i am stumped. i want to raise a number to the power of another number. but the ^ button will not let me do this all i have figured out is to square a number any help?

result=first^second; wont let me use the ^ operation
I think you need to use the pow() function

... = pow ( base , exp );

base ^ exp
 
Back
Top