printf("%f %.3f %.2f %.1f", 4.5678, 4.5678, 4.5678, 4.5678);
I tried putting \n at the end of the series of floats to separate the line
printf("%f %.3f %.2f %.1f", 4.5678, 4.5678, 4.5678, 4.5678)\n;
CodePudding user response:
That \n should be inside the strings of printf not after it
printf("%f %.3f %.2f %.1f \n", 4.5678, 4.5678, 4.5678, 4.5678);