Lecture 142
Procedures and Functions
Code:
#include <iostream>
#include <conio.h>
using namespace std;
void Twobeep(void);   
// Prototype for Twobeep();
main ()
{  
  Twobeep();
 
cout<<"Type any character\n";       
  getch();
  Twobeep();
  return 0;
}
void Twobeep()
{
 
cout<<"\x7";     
  for(int
i=0;i<100000;i++)
      ;     // Null Statement
 
cout<<"\n";         
}
Code view in dev compiler:
Compile the program Ctrl+F9
      Run program Ctrl+F10



 


