What is the output of the program, printf() - C Language Basics

C examples for Language Basics:printf

Description

What is the output of the program, printf()

Demo Code

#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", &cents); 
         printf ("$%i.%.2i\n\n", dollars, cents); 
    } //  w  ww .j a v a 2 s . com
    return 0; 
}

Result


Related Tutorials