I cant get the exact value when i do the multiplication with two value

This is my code.

1
2
3
4
5
6
7
8
  {
       double e , f;     
            cout<<"Enter 2 numbers="<<endl;
            cin>>e>>f;
            cout<<"The multiplication result is = "<<e*f<<endl;
            cout<<"\n";
}
            


when i input e= 7777.77 and f= 5555.55 , the result showed 4.32098e+007.
What was the error of my code?
Last edited on
That answer looks correct to me, to within the level of precision being written out.

What, exactly, is the problem? Is it that you want more precision? Is it that you don't like exponential notation? Is it something else?

We can't read your mind.
Yes MikeyBoy , i dont want the exponential notation . What should i do then?
std::cout << std::fixed << e << " * " << f << " == " << e*f << '\n' ;
Thank you.
Topic archived. No new replies allowed.