slugger
Banned
I am trying to print out two calculated values using a single printf statement, but am unable to do so.
The part of the program where I am trying to do this looks like this
where the 2 float point values have alredy been claculated earlier.
However instead of taking both the values and printing them, in the output only the first %f is being replaced with the value assigned to floatpt1 whereas the other %f is printed as it is.
Can anybody please tell me how to do I ensure that the second %f is also replaced with the valued assigned to floatpt2 in the printf statement
Thanks
The part of the program where I am trying to do this looks like this
Code:
printf ("The answers are %f and %f\n", floatpt1, floatpt2);
However instead of taking both the values and printing them, in the output only the first %f is being replaced with the value assigned to floatpt1 whereas the other %f is printed as it is.
Can anybody please tell me how to do I ensure that the second %f is also replaced with the valued assigned to floatpt2 in the printf statement
Thanks