So this is my code so far:
printf("Input:\t Radius:\tSurface Area:\t Circumference:\t Volume:\n\n");
scanf("%lg", &diameter);
printf("%lg%lg\t\t%-12lg\t\t%-12lg\t\t%-12lg\n\n", diameter, calcRadius(diameter), calcSurfaceArea(diameter), calcCircumference(diameter), calcVolume(diameter));
My output appears like this:
Input: Radius: Surface Area: Circumference: Volume:
99
9949.5 30775.1 310.86 507790
Press any key to continue . . .
How can I make the output appear like this instead:
Input: Radius: Surface Area: Circumference: Volume:
99 9949.5 30775.1 310.86 507790
Press any key to continue . . .
In short, I realize that after scanf() is used and the user presses enter, the printf() automatically prints to the new line. How can I get it so it will print on the same line the user typed a number onto, even when the user presses enter.
Should I be using a different function for getting input, or a completely different method altogether?