Help needed. I'm writing a simple code that computes metric and imperial measurements, however when I try this multiplication "output =(input*0.001)*0.001"
it gives me the answer in scientific notation "1e-006", but what I want to display is "0.000001"
I'll try that one also, but I found a solution. Here is a piece of the code:
if (unit == "J" || unit == "j" )
{
std::cout.precision(6);
output = input * 1;
std::cout<<"Wieght is "<<std::fixed<<output<<"(mg)\n";
}
I used "fixed" in my output statement to show the numbers in non-scientific form, or use "scientific"
instead of "fixed" to show your number and anything behind the decimal will be in scientific notation. Thx for your input though.