#include
#include
#include
main()
{
clrscr();
int port=0x378;
int i,n,j,t;
textcolor(14);
cout<<"
";
cprintf(" A PROGRAM FOR MONETRING SYSTEM ");
cout<<"
";
cprintf("
Enter the number of cycles -> ");
cin>>n;
cprintf("
Enter the time delay between each display -> ");
cin>>t;
j=t*100;
for(i=1;i<=n;i++)
{
outportb(port,1);
delay(j);
outportb(port,2);
delay(j);
outportb(port,4);
delay(j);
outportb(port,8);
delay(j);
outportb(port,16);
delay(j);
outportb(port,32);
delay(j);
outportb(port,64);
delay(j);
outportb(port,128);
delay(j);
}
outportb(port,0);
cprintf("
Request Completed... ");
getch();
}