Ask your own question, for FREE!
Computer Science 21 Online
OpenStudy (anonymous):

im outputing 100000 and its making it 1e006 .. how do i fix this?

OpenStudy (anonymous):

this is c++ btw

OpenStudy (anonymous):

What exactly are you outputting? Would help if you provide some context :(

OpenStudy (anonymous):

Look at this: http://www.cplusplus.com/reference/iostream/manipulators/fixed/

OpenStudy (anonymous):

int main(int argc, char** argv) { double a = 1000000; cout << fixed << a << endl; return 0; }

OpenStudy (anonymous):

Also, if you like C's printf function, printf("%f\n", a) won't use scientific notation.

OpenStudy (anonymous):

yeah he was complaining about scientific notation :P

OpenStudy (anonymous):

u should use code editors like Codepad and Ideone.

OpenStudy (anonymous):

it's small fragment of program so it's ok

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!