how do you write 3.00 * 10 to the power of 8 in c++? i think it is 3.00* double pow10(int x) and x = 8.but its not working. plzz help thx.
About c++ plzzzz helppppppp.?
double temp = 3.0e8;
Reply:#include %26lt;iostream%26gt;
#include %26lt;cmath%26gt;
using namespace std;
int
main(int argc,char *argv[]){
// If you do not want output in exponential form
// double double res=0;
long double res=0.0;
long double val=30.0;
res = pow(val,8);
cout %26lt;%26lt; res %26lt;%26lt; endl;
return(0);
}
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment