double i;
i=pow(10,10);
cout<<i;
for this code i get in output 1e+10
but how i can get output 10000000000 using cout<< and double variable
double i;
i=pow(10,10);
cout<<i;
for this code i get in output 1e+10
but how i can get output 10000000000 using cout<< and double variable
cout << fixed << x
it is not working there is no display, i need information about "fixed" u used
Find info here about std::fixed. google is your good programming buddy, learn to use it.
#include <iostream>
#include <cmath>
int main()
{
double x = pow(10.0,10.0);
std::cout << std::fixed << x << '\n';
}
Thanks for the help.
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.