Code Problem

I tried it but I keep getting it wrong, I wrote what I have after the question.

Given three variables , a, b, c, of type double that have already been declared and initialized , write a statement that prints each of them on the same line, separated by one space, in such away that scientific (or e-notation or exponential notation) is avoided. Each number should be printed with 5 digits to the right of the decimal point. For example, if their values were 4.014268319, 14309, 0.00937608, the output would be:

|4.01427x14309.00000x0.00938

NOTE: The vertical bar, | , on the left above represents the left edge of the print area; it is not to be printed out. Also, we show x in the output above to represent spaces-- your output should not actually have x's!


1
2
cout << setprecision(5);
cout << fixed << a << "" "" << b << "" "" << c << "" "";
Why do you have two double quotes before and after spaces?
that should work.
I got it wrong though.
Topic archived. No new replies allowed.