Thursday, October 7, 2010

Sunil Rai Project Star

/*Coded and Compiled By: Sunil Rai (sunilplayer@gmail.com)*/
/*(c)Lateral Guys,2010*/
#include
#include
#include

void main()
{
clrscr();
int i,j,n,k;
textcolor(GREEN);
cprintf("Enter how many rows u want to see:");
cin>>n;
for(i=0;i<=n;i++)
{

for(k=n;k>=i;k--)
{
cout<<" ";
}
for(j=0;j<=i;j++)
{
if((i%2)==0)
{
textcolor(((i+1)%15)+BLINK);
cprintf("* ");
}
else
{
textcolor(((i+1)%15));
cprintf("* ");
}
}
cout<}
getch();
}
/*Coded and Compiled By: Sunil Rai (sunilplayer@gmail.com)*/
/*(c)Lateral Guys,2010*/

Sunil Rai Project String

/*Coded and Compiled By: Sunil Rai (sunilplayer@gmail.com)*/
/*(c)Lateral Guys,2010*/
#include
#include
#include

void main()
{
char data[100];
int i,nov=0,noc=0,nows=0,nocl=0;
int LOOP=1,choice=0;
clrscr();
cout<<"\n Enter the paragraph : ";
gets(data);
while(LOOP==1)
{
nov=0; noc=0; nows=0; nocl=0;
clrscr();
cout<<"\n Choice Menu ";
cout<<"\n 1. Vowels";
cout<<"\n 2. Consonants";
cout<<"\n 3. White Space";
cout<<"\n 4. Capital Letters";
cout<<"\n 5. Exit";
cout<<"\n\n Enter your choice 1-5";
cin>> choice;
switch(choice)
{
case 1: for(i=0; data[i]!='\0'; i++)
{
if(data[i]=='A' || data[i]=='a' ||data[i]=='E' || data[i]=='e' ||data[i]=='O' || data[i]=='o' ||data[i]=='I' || data[i]=='i' ||data[i]=='u' || data[i]=='U')
{
nov++;
textcolor(RED);
cprintf("%c",data[i]);
}
else
{
textcolor(WHITE);
cprintf("%c",data[i]);
}
}
cout<<"\n The Vowels = "< break;
case 2: for(i=0; data[i]!='\0'; i++)
{
if(data[i]=='A' || data[i]=='a' ||data[i]=='E' || data[i]=='e' ||data[i]=='O' || data[i]=='o' ||data[i]=='I' || data[i]=='i' ||data[i]=='u' || data[i]=='U')
{
textcolor(WHITE);
cprintf("%c",data[i]);
}
else
{
noc++;
textcolor(GREEN);
cprintf("%c",data[i]);
}
}
cout<<"\n The consonents = "< break;

case 3: for(i=0; data[i]!='\0'; i++)
{
if(data[i]==' ')
{
nows++;
textcolor(WHITE);
cprintf("%c",data[i]);
}
}
cout<<"\n The Whitespace = "< break;
case 4: for(i=0; data[i]!='\0'; i++)
{
if(data[i]>='A' && data[i]<='Z')
{
nocl++;
textcolor(GREEN);
cprintf("%c",data[i]);
}
else
{
textcolor(WHITE);
cprintf("%c",data[i]);
}
}
cout<<"\n The Capital = "< break;

case 5 : LOOP=0; break;
default: cout<<"\n Wrong Choice Khoteh!!";
}
cout<<"\n Press any Key to Continue !";
textcolor(WHITE);
getch();
}

getch();
}
/*Coded and Compiled By: Sunil Rai (sunilplayer@gmail.com)*/
/*(c)Lateral Guys,2010*/

Sunil Rai Project Clinic

/*Coded and Compiled By: Sunil Rai (sunilplayer@gmail.com)*/
/*(c)Lateral Guys,2010*/
#include
#include
#include
void add();
void view();
void search();
void search1();
void search2();
void del();
void del1();
void del2();
void update();
void up1();
void up2();
void up3();
void up4();
void up5();
void copy();
class clinic
{
private:
char name[20],address[20];
char age[4];
char dis[20];
char tele[9];
public:
clinic()
{
strcpy(name,"\0");
strcpy(address,"\0");
strcpy(dis,"\0");
strcpy(age,"\0");
strcpy(tele,"\0");
}
void get()
{
strcpy(name,"\0");
strcpy(address,"\0");
strcpy(dis,"\0");
strcpy(age,"\0");
strcpy(tele,"\0");
cout<<"\n\n\nENTER PATIENT NAME :";
cin>>name;
cout<<"ENTER PATIENT AGE :";
cin>>age;
cout<<"ENTER PATIENT ADDRESS :";
cin>>address;
cout<<"ENTER PATIENT TELEPHONE NO. :";
cin>>tele;
cout<<"ENTER PATIENT DISEASE :";
cin>>dis;
}
void show()
{
cout<<"\nNAME OF THE PATIENT IS :"< cout<<"\nAGE OF PATIENT IS :"< cout<<"\nADDRESS OF PATIENT IS :"< cout<<"\nTELEPHONE NO. OF PATIENT IS :"< cout<<"\nDISEASE OF PATIENT IS :"< }
int check1(char home[])
{
if(strcmp(address,home)==0)
return 1;
else
return 0;
}
int check2(char ph[])
{
if(strcmp(ph,tele)==0)
return 1;
else
return 0;
}
void upname()
{
cout<<"\nENTER NEW NAME :";
cin>>name;
}
void upadd()
{
cout<<"\nENTER THE NEW ADDRESS :";
cin>>address;
}
void uptele()
{
cout<<"\nENTER THE NEW TELEPHONE NO. :";
cin>>tele;
}
void upadd_tele()
{
cout<<"\nENTER THE NEW ADDRESS :";
cin>>address;
cout<<"\nENTER THE NEW TELEPHONE NO. :";
cin>>tele;
}
};

void main()
{
clrscr();
char ans;
int ch;
do
{
clrscr();
cout<<"!!!!!!!!!!!!!!!!!!!!!! MAIN MENU !!!!!!!!!!!!!!!!!!";
cout<<"\n\t[1]. TO ADD NEW RECORD";
cout<<"\n\t[2]. TO VIEW ALL RECORDS";
cout<<"\n\t[3]. TO SEARCH A RECORD";
cout<<"\n\t[4]. TO DELETE A RECORD";
cout<<"\n\t[5]. TO UPDATE A RECORD";
cout<<"\n\t[6]. TO MAKE A NEW COPY OF RECORDS";
cout<<"\n\t[7]. TO QUIT";
cout<<"\n\nENTER YOUR CHOICE :";
cin>>ch;
switch(ch)
{
case 1:
add();
break;
case 2:
view();
break;
case 3:
search();
break;
case 4:
del();
break;
case 5:
update();
break;
case 6:
copy();
break;
case 7:
cout<<"\nARE YOU SURE YOU WANT TO QUIT (Y/N) :";
cin>>ans;
if(ans=='y' || ans=='Y')
ch=7;
else
ch=0;
break;
default:
cout<<"\n\tWRONG CHOICE" ;
cout<<"\n\tENTER THE CHOICE BETWEEN 1-7 ";
getch();
}
}
while(ch!=7);
cout<<"\n Press any Key to Continue!!!";
getch();
}

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ADD~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//

void add()
{
char ch;
clinic c;
fstream cfile;
do
{
clrscr();
cout<<"\n!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!";
cout<<"\nENTER PATIENT'S DATA ";
cout<<"\n!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!";
cfile.open("CLINI.DAT",ios::app);
c.get();
cfile.write((char*)&c,sizeof(c));
cfile.close();
cout<<"\n\n\nDO YOU WANT TO ADD MORE RECORDS (Y/N) :";
cin>>ch;
}while(ch=='y' || ch=='Y');
}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//



//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~VIEW~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//

void view()
{
clinic c;
fstream cfil;
int i=0;
cfil.open("CLINI.DAT",ios::in);
cfil.read((char*)&c,sizeof(c));
while(!cfil.eof())
{
clrscr();
cout<<"\n##############################";
cout<<"\n\tPATIENT NO. :"<<++i;
cout<<"\n##############################";
c.show();
getch();
cfil.read((char*)&c,sizeof(c));
}
cout<<"\n Press Key To Continue!!";
getch();
cfil.close();
}

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//



//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~SEARCH~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//

void search()
{
clrscr();
char ans;
int ch;
do
{
clrscr();
cout<<"!!!!!!!!!!!!!!!!!!!!! SEARCH MENU !!!!!!!!!!!!!!!!!!!!";
cout<<"\n\t[1]. TO SEARCH BY ADDRESS";
cout<<"\n\t[2]. TO SEARCH BY TELEPHONE NO.";
cout<<"\n\t[3]. TO QUIT";
cout<<"\n\nENTER YOUR CHOICE :";
cin>>ch;
switch(ch)
{
case 1:
search1();
break;
case 2:
search2();
break;
case 3:
cout<<"\nARE YOU SURE YOU WANT TO QUIT (Y/N) :";
cin>>ans;
if(ans=='y' || ans=='Y')
ans=3;
else
ans=0;
break;
default:
cout<<"\n\tWRONG CHOICE" ;
cout<<"\n\tENTER THE CHOICE BETWEEN 1-3 ";
getch();
}
}while(ch!=3);
getch();
}

void search1()
{
char add[20];
strcpy(add,"\0");
clinic c;
fstream cfile;
cfile.open("CLINI.DAT",ios::in);
if(!cfile)
{
cout<<"\n\nTHERE IS NO FILE";
return;
}
cout<<"\nENTER THE ADDRESS :";
cin>>add;
cfile.read((char*)&c,sizeof(c));
int flag=0;
while(!cfile.eof())
{
if(c.check1(add)==1)
{
c.show();
flag=1;
}
cfile.read((char*)&c,sizeof(c));
}
if(flag==0)
{
cout<<"SORRY!";
cout<<"THERE IS NO RECORD";
}
cout<<"\n Press any Key to Continue!!!";
getch();
cfile.close();
}

void search2()
{
char telno[8];
clinic c;
fstream cfile;
cfile.open("CLINI.DAT",ios::in|ios::out|ios::app);
cout<<"\nENTER THE TELEPHONE NO. :";
cin>>telno;
cfile.seekg(0);
cfile.read((char*)&c,sizeof(c));
int flag=0;
while(!cfile.eof())
{
if(c.check2(telno)==1)
{
c.show();
flag=1;
}
cfile.read((char*)&c,sizeof(c));
}
if(flag==0)
{
cout<<"SORRY!";
cout<<"THERE IS NO RECORD";
}
cout<<"\n Press any Key to Continue!!!";
getch();
cfile.close();
}


//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//


//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~DELETE~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//

void del()
{
int ch;
char ans;
do
{
clrscr();
cout<<"!!!!!!!!!!!!!!!!!! DELETE MENU !!!!!!!!!!!!!!!!!!!!!!!";
cout<<"\n\t[1]. TO ENTER THE ADDRESS";
cout<<"\n\t[2]. TO ENTER THE TELEPHONE NO.";
cout<<"\n\t[3]. TO QUIT";
cout<<"\n\nENTER YOUR CHOICE :";
cin>>ch;
switch(ch)
{
case 1:
del1();
break;
case 2:
del2();
break;
case 3:
cout<<"\nARE YOU SURE YOU WANT TO QUIT (Y/N) :";
cin>>ans;
if(ans=='y' || ans=='Y')
ch=3;
else
ch=0;
break;
default:
cout<<"\n\tWRONG CHOICE" ;
cout<<"\n\tENTER THE CHOICE BETWEEN 1-3 ";
getch();
}
}
while(ch!=3);
getch();
}

void del1()
{
clinic c;
char ans;
char add[20];
strcpy(add,"\0");
fstream cfile,nfile;
cfile.open("CLINI.DAT",ios::in);
nfile.open("CLI.DAT",ios::out);
cfile.read((char*)&c,sizeof(c));
cout<<"\nENTER THE ADDRESS :";
cin>>add;
while(!cfile.eof())
{
if(c.check1(add)!=1)
{
nfile.write((char*)&c,sizeof(c));
}
else
{
c.show();
cout<<"\nIS THIS THE RECORD YOU WANT TO DELETE (Y/N) :";
cin>>ans;
if(ans=='n' || ans=='N')
{
nfile.write((char*)&c,sizeof(c));
}
else
cout<<"\nONE RECORD DELETED";
}
cfile.read((char*)&c,sizeof(c));
}
nfile.close();
cfile.close();
cfile.open("CLINI.DAT",ios::out);
nfile.open("CLI.DAT",ios::in);
nfile.read((char*)&c,sizeof(c));
while(!nfile.eof())
{
cfile.write((char*)&c,sizeof(c));
nfile.read((char*)&c,sizeof(c));
}
getch();
nfile.close();
cfile.close();
}

void del2()
{
clinic c;
char ans;
char telno[8];
strcpy(telno,"\0");
fstream cfile,nfile;
cfile.open("CLINI.DAT",ios::in);
nfile.open("CLI.DAT",ios::out);
cfile.read((char*)&c,sizeof(c));
cout<<"\nENTER THE TELEPHONE NO. :";
cin>>telno;
while(!cfile.eof())
{
if(c.check2(telno)!=1)
{
nfile.write((char*)&c,sizeof(c));
}
else
{
c.show();
cout<<"\nIS THIS THE RECORD YOU WANT TO DELETE (Y/N) :";
cin>>ans;
if(ans=='n' || ans=='N')
{
nfile.write((char*)&c,sizeof(c));
}
else
cout<<"\nONE RECORD DELETED";
}
cfile.read((char*)&c,sizeof(c));
}
nfile.close();
cfile.close();
cfile.open("CLINI.DAT",ios::out);
nfile.open("CLI.DAT",ios::in);
nfile.read((char*)&c,sizeof(c));
while(!nfile.eof())
{
cfile.write((char*)&c,sizeof(c));
nfile.read((char*)&c,sizeof(c));
}
getch();
nfile.close();
cfile.close();
}

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//


//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~UPDATE~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//

void update()
{
int ch;
char ans;
do
{
clrscr();
cout<<"!!!!!!!!!!!!!!!!!!! UPDATE MENU !!!!!!!!!!!!!!!!!!!!!";
cout<<"\n\t[1]. TO CHANGE NAME";
cout<<"\n\t[2]. TO CHANGE ADDRESS";
cout<<"\n\t[3]. TO CHANGE TELEPHONE NO.";
cout<<"\n\t[4]. TO CHANGE ADDRESS AND TELEPHONE NO.";
cout<<"\n\t[5]. TO QUIT";
cout<<"\n\nENTER YOUR CHOICE :";
cin>>ch;
switch(ch)
{
case 1:
up1();
break;
case 2:
up2();
break;
case 3:
up3();
break;
case 4:
up4();
break;
case 5:
cout<<"\nARE YOU SURE YOU WANT TO QUIT (Y/N) :";
cin>>ans;
if(ans=='y' || ans=='Y')
ch=5;
else
ch=0;
break;
default:
cout<<"\n\tWRONG CHOICE" ;
cout<<"\n\tENTER THE CHOICE BETWEEN 1-5 ";
getch();
}
}
while(ch!=5);
getch();
}


void up1()
{
clinic c;
fstream cfile,nfile;
char teleno[8],ans;
strcpy(teleno,"\0");
cfile.open("CLINI.DAT",ios::in|ios::out|ios::app);
nfile.open("NEW.DAT",ios::in|ios::out);
cout<<"\nENTER THE TELPHONE NO. OF THE PERSON :";
cin>>teleno;
cfile.read((char*)&c,sizeof(c));
while(!cfile.eof())
{
if(c.check2(teleno)==1)
{
c.show();
cout<<"\n\nIS THIS THE RECORD YOU WANT TO UPDATE (Y/N) :";
cin>>ans;
if(ans=='y' || ans=='Y')
{
c.upname();
nfile.write((char*)&c,sizeof(c));
c.show();
}
else
nfile.write((char*)&c,sizeof(c));
}
else
nfile.write((char*)&c,sizeof(c));
cfile.read((char*)&c,sizeof(c));
}
nfile.close();
cfile.close();
cfile.open("CLINI.DAT",ios::out);
nfile.open("NEW.DAT",ios::in);
nfile.read((char*)&c,sizeof(c));
while(!nfile.eof())
{
cfile.write((char*)&c,sizeof(c));
nfile.read((char*)&c,sizeof(c));
}
getch();
nfile.close();
cfile.close();
}


void up2()
{
clinic c;
fstream cfile,nfile;
char teleno[8],ans;
strcpy(teleno,"\0");
cfile.open("CLINI.DAT",ios::in|ios::out|ios::app);
nfile.open("NEW.DAT",ios::in|ios::out);
cout<<"\nENTER THE TELPHONE NO. OF THE PERSON :";
cin>>teleno;
cfile.read((char*)&c,sizeof(c));
while(!cfile.eof())
{
if(c.check2(teleno)==1)
{
c.show();
cout<<"\n\nIS THIS THE RECORD YOU WANT TO UPDATE (Y/N) :";
cin>>ans;
if(ans=='y' || ans=='Y')
{
c.upadd();
nfile.write((char*)&c,sizeof(c));
c.show();
}
else
nfile.write((char*)&c,sizeof(c));
}
else
nfile.write((char*)&c,sizeof(c));
cfile.read((char*)&c,sizeof(c));
}
nfile.close();
cfile.close();
cfile.open("CLINI.DAT",ios::out);
nfile.open("NEW.DAT",ios::in);
nfile.read((char*)&c,sizeof(c));
while(!nfile.eof())
{
cfile.write((char*)&c,sizeof(c));
nfile.read((char*)&c,sizeof(c));
}
getch();
nfile.close();
cfile.close();
}


void up3()
{
clinic c;
fstream cfile,nfile;
char teleno[8],ans;
strcpy(teleno,"\0");
cfile.open("CLINI.DAT",ios::in|ios::out|ios::app);
nfile.open("NEW.DAT",ios::in|ios::out);
cout<<"\nENTER THE TELPHONE NO. OF THE PERSON :";
cin>>teleno;
cfile.read((char*)&c,sizeof(c));
while(!cfile.eof())
{
if(c.check2(teleno)==1)
{
c.show();
cout<<"\n\nIS THIS THE RECORD YOU WANT TO UPDATE (Y/N) :";
cin>>ans;
if(ans=='y' || ans=='Y')
{
c.uptele();
nfile.write((char*)&c,sizeof(c));
c.show();
}
else
nfile.write((char*)&c,sizeof(c));
}
else
nfile.write((char*)&c,sizeof(c));
cfile.read((char*)&c,sizeof(c));
}
nfile.close();
cfile.close();
cfile.open("CLINI.DAT",ios::out);
nfile.open("NEW.DAT",ios::in);
nfile.read((char*)&c,sizeof(c));
while(!nfile.eof())
{
cfile.write((char*)&c,sizeof(c));
nfile.read((char*)&c,sizeof(c));
}
getch();
nfile.close();
cfile.close();
}


void up4()
{
clinic c;
fstream cfile,nfile;
char teleno[8],ans;
strcpy(teleno,"\0");
cfile.open("CLINI.DAT",ios::in|ios::out|ios::app);
nfile.open("NEW.DAT",ios::in|ios::out);
cout<<"\nENTER THE TELPHONE NO. OF THE PERSON :";
cin>>teleno;
cfile.read((char*)&c,sizeof(c));
while(!cfile.eof())
{
if(c.check2(teleno)==1)
{
c.show();
cout<<"\n\nIS THIS THE RECORD YOU WANT TO UPDATE (Y/N) :";
cin>>ans;
if(ans=='y' || ans=='Y')
{
c.upadd_tele();
nfile.write((char*)&c,sizeof(c));
c.show();
}
else
nfile.write((char*)&c,sizeof(c));
}
else
nfile.write((char*)&c,sizeof(c));
cfile.read((char*)&c,sizeof(c));
}
nfile.close();
cfile.close();
cfile.open("CLINI.DAT",ios::out);
nfile.open("NEW.DAT",ios::in);
nfile.read((char*)&c,sizeof(c));
while(!nfile.eof())
{
cfile.write((char*)&c,sizeof(c));
nfile.read((char*)&c,sizeof(c));
}
getch();
nfile.close();
cfile.close();
}


//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~COPY~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//

void copy()
{
int i=0;
char file[12];
strcpy(file,"\0");
fstream cfile,efile;
clinic c;
char ch;
cout<<"\nENTER THE NAME OF THE NEW FILE :";
cin>>file;
cfile.open("CLINI.DAT",ios::in|ios::out|ios::app);
efile.open(file,ios::in|ios::out|ios::app);
cfile.read((char*)&c,sizeof(c));
while(!cfile.eof())
{
efile.write((char*)&c,sizeof(c));
cfile.read((char*)&c,sizeof(c));
}
cout<<"\n\n\nDO YOU WANT TO VIEW THE NEW COPIED FILE (Y/N) :";
cin>>ch;
if(ch=='y' || ch=='Y')
{
efile.seekg(0);
efile.read((char*)&c,sizeof(c));
while(!efile.eof())
{
clrscr();
cout<<"\n##############################";
cout<<"\n\tPATIENT NO. :"<<++i;
cout<<"\n##############################";
c.show();
efile.read((char*)&c,sizeof(c));
getch();
}
}
getch();
efile.close();
cfile.close();
}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//

/*Coded and Compiled By: Sunil Rai (sunilplayer@gmail.com)*/
/*(c)Lateral Guys,2010*/

Monday, February 22, 2010

Sunil Rai...Project For C++, Digital Clock

/*Coded and Compiled By: Sunil Rai (sunilplayer@gmail.com)*/
/*(c)Lateral Guys,2007*/
#include"iostream.h"
#include"conio.h"
#include"graphics.h"
#include"dos.h"
#define SIZE 40

void display(int def_x, int def_y, int k)
{
int arrlight[10][20]={ 0,1,1,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,1,1,
0,1,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,1,1,1,
0,1,1,1,0,0,0,1,0,1,1,1,0,1,0,0,0,1,1,1,
0,1,1,1,0,0,0,1,0,1,1,1,0,0,0,1,0,1,1,1,
0,1,0,1,0,1,0,1,0,1,1,1,0,0,0,1,0,0,0,1,
0,1,1,1,0,1,0,0,0,1,1,1,0,0,0,1,0,1,1,1,
0,1,1,1,0,1,0,0,0,1,1,1,0,1,0,1,0,1,1,1,
0,1,1,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,
0,1,1,1,0,1,0,1,0,1,1,1,0,1,0,1,0,1,1,1,
0,1,1,1,0,1,0,1,0,1,1,1,0,0,0,1,0,1,1,1};
int arrx1[SIZE],arrx2[SIZE],arry1[SIZE],arry2[SIZE];
int x=0,y=0,i=0,j=0,pos=0,l=0;
x=def_x; y=def_y;
for(i=0;i<5;i++)
{
for(j=0;j<4;j++)
{
arrx1[pos]=x; arry1[pos]=y;
arrx2[pos]=x+10; arry2[pos]=y+10;
pos++;
x=x+15;
}
x=def_x;
y=y+15;
}

for(l=0;l<20;l++)
{
setfillstyle(1,BLACK);
bar(arrx1[l],arry1[l],arrx2[l],arry2[l]);
}
for(l=0;l<20;l++)
{

if(arrlight[k][l]==1)
{ setfillstyle(1,GREEN); }
else
{ setfillstyle(1,BLACK);}
bar(arrx1[l],arry1[l],arrx2[l],arry2[l]);
}
}

void main()
{
clrscr();
int hr,min;
cout<<"\n Enter Hours to set alaram (0 - 23) :"; cin>>hr;
cout<<"\n Enter Minute to set alaram (0 - 59) :"; cin>>min;
int gd=DETECT,gm;
initgraph(&gd,&gm,"c:\\tc\\bgi");
struct time t;
int mdgt,mudgt,mtdgt,hdgt,hudgt,htdgt,sdgt,sudgt,stdgt;
while(!kbhit())
{
gettime(&t);
sdgt=t.ti_sec; stdgt=t.ti_sec/10; sudgt=sdgt-(stdgt*10);
mdgt=t.ti_min; mtdgt=t.ti_min/10; mudgt=mdgt-(mtdgt*10);
hdgt=t.ti_hour; htdgt=t.ti_hour/10; hudgt=hdgt-(htdgt*10);
if((sdgt%2)==0)
{
display(100,200,htdgt); display(180,200,hudgt);
setfillstyle(1,BLACK);
bar(245,200,255,225);bar(245,250,255,275);
display(260,200,mtdgt); display(340,200,mudgt);
setfillstyle(1,BLACK);
bar(405,200,415,225);bar(405,250,415,275);
display(420,200,stdgt); display(500,200,sudgt);
}
else
{
display(100,200,htdgt); display(180,200,hudgt);
setfillstyle(1,GREEN);
bar(245,200,255,225);bar(245,250,255,275);
display(260,200,mtdgt); display(340,200,mudgt);
setfillstyle(1,GREEN);
bar(405,200,415,225);bar(405,250,415,275);
display(420,200,stdgt); display(500,200,sudgt);
}
if(t.ti_min==min && t.ti_hour==hr)
{
sound(300);
delay(500);
nosound();
}
delay(1000);
}
closegraph();
restorecrtmode();
cout<<"\nPress Any Key to exit!";
getch();
}
/*Coded and Compiled By: Sunil Rai (sunilplayer@gmail.com)*/
/*(c)Lateral Guys,2007*/

Sunil Rai...Project For C++ Library

/*Coded and Compiled By: Sunil Rai (sunilplayer@gmail.com)*/
/* Call Me : 9818957447*/ /*(c)Lateral Guys,2007*/
#include "stdio.h"
#include "conio.h"
#include "graphics.h"
#include "dos.h"
#include "iostream.h"
#include "fstream.h"
#include "string.h"
int CHOICE=1, LOOP=0, SR=500;
struct datm
{
int dd;
int mm;
int yy;
};
struct book
{
int rec_no;
char book_name[20];
char book_author[20];
char stu_name[20];
char stu_class[2];
struct datm issue;
struct datm back;
char flag;
};

void button(int in_xt, int in_yt, int color, char *msg)
{
int in_xf=in_xt+(strlen(msg)*9);
int in_yf=in_yt+30;
setfillstyle(1,WHITE);
bar(in_xt-2, in_yt-2,in_xf,in_yf);
setfillstyle(1,DARKGRAY);
bar(in_xt, in_yt, in_xf+2, in_yf+2);
if(color==0)
{
setfillstyle(1,LIGHTGRAY);
bar(in_xt,in_yt,in_xf,in_yf);
outtextxy(in_xt+10,in_yt+10,msg);
}
else
{
setfillstyle(1,LIGHTGREEN);
bar(in_xt,in_yt,in_xf,in_yf);
setcolor(BLACK);
outtextxy(in_xt+10,in_yt+10,msg);
setcolor(WHITE);
}
}

void disp(int in_xt, int in_yt, int bk_col, int txt_col, char *msg)
{
int in_xf=in_xt+(strlen(msg)*9);
int in_yf=in_yt+30;
setfillstyle(1,WHITE);
bar(in_xt-2, in_yt-2, in_xf, in_yf);
setfillstyle(1,DARKGRAY);
bar(in_xt, in_yt, in_xf+2, in_yf+2);
setfillstyle(1,bk_col);
bar(in_xt-2, in_yt, in_xf, in_yf);
setcolor(txt_col);
outtextxy(in_xt+10, in_yt+10,msg);
setcolor(WHITE);
}

void blank()
{
clrscr();
setfillstyle(1,BLACK);
bar(0,0,getmaxx(),getmaxy());
gotoxy(1,1);
}

void wait()
{
button(200,400,0," Press Any Key To Continue!! ");
getch();
}

void welcome()
{
int i, x1=20, x2=570, y=100;
char *m;
settextstyle(1,0,3);
setcolor(GREEN);
outtextxy(100,50, " (C) Sunil Rai International.... V1.1 ");
settextstyle(1,0,3);
setcolor(GREEN);
outtextxy(100,400," (R) Library Management FreeWare ");
for(i=0;i<=11;i++)
{
sprintf(m,"%d % ", (i-1)*10);
settextstyle(1,0,8);
disp(x1,y,i,7," ");
x1=x1+50;
disp(x2,y+250,i,7," ");
x2=x2-50;
settextstyle(1,0,8);
setcolor(BLACK);
outtextxy(100,200," Loading... ");
setfillstyle(1,BLACK);
bar(270,300,400,340);
delay(SR);
setcolor(i);
settextstyle(1,0,8);
outtextxy(100,200," Loading... ");
setcolor(WHITE);
settextstyle(3,0,4);
outtextxy(270,300,m);
delay(SR);
}
blank();
}

void bye()
{
blank();
button(130,400,0," (R)SR International... V1.1, Quiting..");
button(130,350,0," Press Any Key To Continue!! ");
while(!kbhit())
{
button(130,100,0," Thank's For Using ");
button(130,150,1," (C)SR International ");
delay(SR);
button(130,100,1," Thank's For Using ");
button(130,150,0," (C)SR International ");
delay(SR);
}
}

void add_book()
{
book b;
char ch='Y';
ofstream outfile;
outfile.open("BOOK.DAT", ios::out | ios::binary);
while(ch=='Y' || ch=='y')
{
blank();
cout<>b.rec_no;
cout<cout<cout<>ch;
b.flag='A';
b.issue.dd=0; b.issue.mm=0; b.issue.yy=0;
b.back.dd=0; b.back.mm=0; b.back.yy=0;
outfile.write((char *)&b, sizeof(b));
}
outfile.close();
blank();
}

void show_book(char kk, char *msg)
{
book b;
char ch='Y';
ifstream infile;
infile.open("BOOK.DAT", ios::out | ios::binary);
blank();
while(infile.read((char *)&b, sizeof(b)))
{
switch(kk)
{
case 'S' :
if(b.flag=='A')
{
cout<cout<cout<}
else
{
cout<cout<}
break;
case 'R' :
if(b.flag=='C')
{
cout<cout<cout<cout<cout<cout<}
else
{
cout<cout<}
break;
}
}
wait();
infile.close();
blank();
}

void issue_book()
{
book b;
int temp=0, count=0, is_book=0;
long int pos;
struct date d3;
fstream file;
file.open("BOOK.DAT", ios::out | ios::in | ios::binary);
blank();
getdate(&d3);
cout<>is_book;
file.seekg(0L, ios::beg);
while(file.read((char *)&b, sizeof(b)))
{
if(b.rec_no==is_book)
{
cout<cout<b.flag='C';
b.issue.dd=d3.da_day;
b.issue.mm=d3.da_mon;
b.issue.yy=d3.da_year;
if((b.issue.dd+7)>31)
{ b.back.dd=(b.issue.dd+7)-31; b.back.mm=b.issue.mm+1; b.back.yy=b.issue.yy; }
else
{ b.back.dd=(b.issue.dd+7); b.back.mm=b.issue.mm; b.back.yy=b.issue.yy; }
pos=count*sizeof(b);
file.seekp(pos,ios::beg);
file.write((char *)&b, sizeof(b));
temp=1;
}
count++;
}

if(temp==0)
{
cout<<"\n Book Not Found or Might be Issued !!!! "<}
else
{
cout<<"\n Book number #"<}
wait();
file.close();
blank();
}

void return_book()
{
book b;
int temp=0, count=0, is_book=0;
long int pos;
struct date d4;
fstream file;
file.open("BOOK.DAT", ios::out | ios::in | ios::binary);
blank();
getdate(&d4);
show_book('R', " Book Available ");
cout<>is_book;
cout<file.seekg(0L, ios::beg);
while(file.read((char *)&b, sizeof(b)))
{
if(b.rec_no==is_book)
{
if(d4.da_day>b.back.dd && d4.da_mon>=b.back.mm)
{
cout<}
b.flag='A';b.issue.dd=0;b.issue.mm=0;b.issue.yy=0;b.back.dd=0;b.back.mm=0;b.back.yy=0;
pos=count*sizeof(b);
file.seekp(pos,ios::beg);
file.write((char *)&b, sizeof(b));
temp=1;
}
count++;
}
if(temp==0)
{
cout<<"\n Book Not Found or Might be Issued !!!! "<}
else
{
cout<<"\n Book number #"<}
wait();
file.close();
blank();
}

void main_menu(int x ,int y)
{
settextstyle(0,0,0);
button(x,y,0," SR International School Library Software ");
int x1=x+100;
button(x1,y+50,0, " [ MAIN MENU ] ");
button(x1,y+100,0," #1 Add Book ");
button(x1,y+150,0," #2 Show Book ");
button(x1,y+200,0," #3 Issue Book ");
button(x1,y+250,0," #4 Return Book ");
button(x1,y+300,0," #5 Exit ");

char ch=getch();
if(ch==80) CHOICE++;
if(ch==72) CHOICE--;
if(CHOICE<1) choice="5;">5) CHOICE=1;
switch(CHOICE)
{
case 1 : button(x1,y+100,1," #1 Add Book ");
if((ch=getch())==13) { add_book(); } break;
case 2 : button(x1,y+150,1," #2 Show Book ");
if((ch=getch())==13) { show_book('S'," Issued Book "); } break;
case 3 : button(x1,y+200,1," #3 Issue Book ");
if((ch=getch())==13) { issue_book(); } break;
case 4 : button(x1,y+250,1," #4 Return Book ");
if((ch=getch())==13) { return_book(); } break;
case 5 : button(x1,y+300,1," #5 Exit ");
if((ch=getch())==13) { LOOP=1; } break;
}
}

void main()
{
int gd=DETECT,gm;
initgraph(&gd,&gm,"c:\\tc\\bgi");
welcome();

while(LOOP==0)
{
main_menu(150,100);
}
bye();
closegraph();
restorecrtmode();
}
/*Coded and Compiled By: Sunil Rai (sunilplayer@gmail.com)*/
/*(c)Lateral Guys,2007*/

Monday, April 21, 2008

Power Of Sharing Presents Boards Of India Result.
CBSE Exams Results www.cbse.nic.in ( <<< Click the Link)
ICSE Exams Results www.thisismyindia.com/education/icse-board.html ( <<< Click the Link)
Haryana Board Results www.indiaresults.com (<<< Click the Link)
Maharashtra State Board Results www.mahresult.nic.in (<<< Click the Link)
Uttar Pradesh Boards Results www.upresults.nic.in ( <<< Click the Link)
Rajsathan Board Results www.rajresults.nic.in (<<< Click the Link)
Goa Board Results www.goaresults.nic.in (<<< Click the Link)
Himachal Pradesh Board Results www.hpresults.nic.in (<<< Click the Link)
Meghalay Boards Results www.megresults.nic.in (<<< Click the Link)
Tripura Boards Results www.tripuraresults.nic.in (Click the Link)
Kerala Board Results www.keralajresults.nic.in (<<< Click the Link)
Bihar Board Results www.biharboard.bih.nic.in (<<< Click the Link)
for more board results log onto www.google.com

Free World Music Videos + Albums

www.break.com

www.blastro.com

www.cyber-knowledge.net/videos/

www.liketelevision.com/

www.bored.com/findvideos/index.html