home *** CD-ROM | disk | FTP | other *** search
/ Microsoft Programmer's Library 1.3 / Microsoft-Programers-Library-v1.3.iso / sampcode / qc / qc25 / beep1.c < prev    next >
Encoding:
C/C++ Source or Header  |  1989-11-15  |  323 b   |  21 lines

  1. /* BEEP1.C: Demonstrate passing arguments */
  2. #include <stdio.h>
  3.  
  4. void beep( int num_beep );
  5.  
  6. main()
  7. {
  8.    printf( "Time to beep\n" );
  9.    beep( 5 );
  10.    printf( "All done\n" );
  11. }
  12.  
  13. void beep( int num_beep )
  14. {
  15.    while( num_beep > 0  )
  16.    {
  17.       printf( "Beep!\a\n" );
  18.       num_beep = num_beep - 1;
  19.    }
  20. }
  21.