
powers
how would you put a number to a power? I know that in a graphing calculator you would do 12^3, but how would you express this in C++? I need to set a variable g to 6.67*10^(11) which is the universal gravitational constant if any one was wondering :P

for x^y, you would use the "math.h" function pow(x, y);

pow  C++ Reference
[edit] Ooooh...not quite quick enough! :)[/edit]

> I need to set a variable g to 6.67*10^(11) which is the universal gravitational constant if any one was wondering :P
Like
double G = 6.67E11;