C examples for Language Basics:printf
What is the output of the program, printf()
#include <stdio.h> int main (void) { int dollars, cents, count; for ( count = 1; count <= 10; ++count ) { printf ("Enter dollars: "); scanf ("%i", &dollars); printf ("Enter cents: "); scanf ("%i", ¢s); printf ("$%i.%.2i\n\n", dollars, cents); } // w ww .j a v a 2 s . com return 0; }