Formatting output: printf()
Example:
sum = 20; count = 30;
printf("%d divided by %d equals %f\n",
sum, count, (float)sum/count);
Output:
20 divided by 3 equals 6.666667
Previous slide
Next slide
Back to first slide
View graphic version