Beeps.c
Upload User: dq031136
Upload Date: 2022-08-08
Package Size: 802k
Code Size: 0k
Development Platform:

C++ Builder

  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. void main(int argc, char *argv[])
  4.  {
  5.    int count;  // The number of times to sound the speaker
  6.    int i;      // The number of times the speaker has been sounded
  7.    // Determine the number of times to ring the bell
  8.    count = atoi(argv[1]);
  9.    for (i = 0; i < count; i++)
  10.      putchar(7);   // ASCII 7 sounds the speaker
  11.  }