Solution for Exercise 5-10
ex0510
#include <stdio.h> int main() { printf("The total is %.1f\n",16.0+17.0); return(0); }
Notes
* Seeing how both values are written with .0
, you could theoretically use the %.0f
placeholder. Doing so would present only the whole number portion of the result.
Copyright © 1997-2024 by QPBC.
All rights reserved