Escolar Documentos
Profissional Documentos
Cultura Documentos
h>
#include<conio.h>
#include<stdio.h>
#include<process.h>
#include<string.h>
#include<iomanip.h>
#include<graphics.h>
#include<math.h>
#include<dos.h>
//***************************************************************
//****************************************************************
class book
char bno[6];
char bname[50];
char aname[20];
public:
void create_book()
textcolor(10);
gotoxy(15,5);cprintf("***************************************************");
gotoxy(15,7);cprintf("***************************************************");
textcolor(14);
textcolor(15);
cin>>bno;gotoxy(55,11);cout<<bno;
gets(bname);gotoxy(55,13);cout<<bname;
gets(aname);gotoxy(55,15);cout<<aname;
textcolor(11);gotoxy(15,18);cprintf("*************************************************
**");
textcolor(6);gotoxy(35,20);cprintf("Book Created..");
void show_book()
{
textcolor(10);
textcolor(14);
gotoxy(30,12);cprintf("...Book Information...");
textcolor(15);
void modify_book()
gets(bname);
gets(aname);
char* retbno()
return bno;
textcolor(15);
//cout<<"\t"<<admno<<setw(20)<<name<<setw(10)<<token<<endl;
gotoxy(15,ghu);cprintf("%s",bno);
gotoxy(32,ghu);cprintf("%s",bname);
gotoxy(52,ghu);cprintf("%s",aname);
//cout<<bno<<setw(30)<<bname<<setw(30)<<aname<<endl;}
class student
char admno[6];
char name[20];
char stbno[6];
int token;
public:
void create_student()
{
//clrscr();
textcolor(11);
gotoxy(15,5);cprintf("***************************************************");
gotoxy(15,7);cprintf("***************************************************");
textcolor(14);
gotoxy(50,12);cout<<" ";
gotoxy(58,14);cout<<" ";
textcolor(15);
cin>>admno;gotoxy(50,12);cout<<admno;
gets(name);gotoxy(58,14);cout<<name;
token=0;
stbno[0]='/0';
textcolor(12);
void show_student(int f)
{ textcolor(15);
gotoxy(30,f);cprintf("Admission no. : %s",admno);
if(token==1)
{gotoxy(30,f+3);cprintf("Book No : %s",stbno);
void modify_student()
gets(name);gotoxy(52,20);cout<<name;
char* retadmno()
return admno;
char* retstbno()
return stbno;
}
int rettoken()
return token;
void addtoken()
{token=1;}
void resettoken()
{token=0;}
strcpy(stbno,t);
textcolor(15);
//cout<<"\t"<<admno<<setw(20)<<name<<setw(10)<<token<<endl;
gotoxy(18,ghu);cprintf("%s",admno);
gotoxy(40,ghu);cprintf("%s",name);
gotoxy(65,ghu);cprintf("%i",token);
}
}; //class ends here
//***************************************************************
//****************************************************************
fstream fp,fp1;
book bk;
student st;
//***************************************************************
//****************************************************************
void write_book()
char ch;
textbackground(0);
textmode(C80);
//clrscr();
clrscr();
gotoxy(g11,1);cprintf("");
gotoxy(g11,24);cprintf("");
for (g11=2;g11<=23;g11++)
gotoxy(1,g11);cprintf("");
gotoxy(79,g11);cprintf("");
for (g11=2;g11<=23;g11++)
gotoxy(2,g11);cprintf("");
gotoxy(80,g11);cprintf("");
fp.open("book.dat",ios::out|ios::app);
do
bk.create_book();
fp.write((char*)&bk,sizeof(book));
cin>>ch;
}while(ch=='y'||ch=='Y');
fp.close();
void write_student()
{
textbackground(0);
textmode(C80);
//clrscr();
clrscr();
gotoxy(g11,1);cprintf("");
gotoxy(g11,24);cprintf("");
for (g11=2;g11<=23;g11++)
gotoxy(1,g11);cprintf("");
gotoxy(79,g11);cprintf("");
for (g11=2;g11<=23;g11++)
gotoxy(80,g11);cprintf("");
char ch;
fp.open("student.dat",ios::out|ios::app);
do
st.create_student();
fp.write((char*)&st,sizeof(student));
gotoxy(15,19);textcolor(13);cprintf("*************************************************
****");
cin>>ch;
}while(ch=='y'||ch=='Y');
fp.close();
}
//***************************************************************
//****************************************************************
//cout<<"\nBOOK DETAILS\n";
int flag=0;
fp.open("book.dat",ios::in);
while(fp.read((char*)&bk,sizeof(book)))
if(strcmpi(bk.retbno(),n)==0)
bk.show_book();
flag=1;
fp.close();
if(flag==0)
getch();
}
void display_sps(char n[])
textcolor(13);
gotoxy(12,11);cprintf("************************************************************
***");
gotoxy(12,9);cprintf("*************************************************************
**");
textcolor(14);
gotoxy(30,10);cprintf("...Student`s Details...");
int flag=0;
fp.open("student.dat",ios::in);
while(fp.read((char*)&st,sizeof(student)))
if((strcmpi(st.retadmno(),n)==0))
st.show_student(14);
flag=1;
fp.close();
if(flag==0)
{ gotoxy(35,15);textcolor(14+BLINK);cprintf("Student does not exist"); }
getch();
//***************************************************************
//****************************************************************
void modify_book()
char n[6];
int found=0;
//clrscr();
cin>>n;gotoxy(56,10);cout<<n;
fp.open("book.dat",ios::in|ios::out);
if(strcmpi(bk.retbno(),n)==0)
bk.show_book();
int pos=-1*sizeof(bk);
fp.seekp(pos,ios::cur);
fp.write((char*)&bk,sizeof(book));
gotoxy(35,22);textcolor(13+BLINK);cprintf("Record Updated");
found=1;
fp.close();
if(found==0)
getch();
void modify_student()
char n[6];
int found=0;
textcolor(11);
gotoxy(12,3);cprintf("*************************************************************
**");
gotoxy(12,5);cprintf("*************************************************************
**");
textcolor(12);
cin>>n;gotoxy(59,7);cout<<n;
fp.open("student.dat",ios::in|ios::out);
if(strcmpi(st.retadmno(),n)==0)
textcolor(12);
st.show_student(12);
textcolor(12);
st.modify_student();
int pos=-1*sizeof(st);
fp.seekp(pos,ios::cur);
fp.write((char*)&st,sizeof(student));
gotoxy(35,22);textcolor(13+BLINK);cprintf("Record Updated");
found=1;
fp.close();
if(found==0)
getch();
//***************************************************************
//****************************************************************
void delete_student()
char n[6];
int flag=0;
//clrscr();
textbackground(0);
textmode(C80);
//clrscr();
clrscr();
gotoxy(g11,1);cprintf("");
gotoxy(g11,24);cprintf("");
for (g11=2;g11<=23;g11++)
gotoxy(1,g11);cprintf("");
gotoxy(79,g11);cprintf("");
for (g11=2;g11<=23;g11++)
gotoxy(80,g11);cprintf("");
textcolor(15);
gotoxy(12,9);cprintf("*************************************************************
**");
gotoxy(12,7);cprintf("*************************************************************
**");
textcolor(12);
gotoxy(30,8);cprintf("...Delete Record...");
//cout<<"\n\n\n\tDELETE STUDENT...";
cin>>n;gotoxy(70,12);cout<<n;
fp.open("student.dat",ios::in|ios::out);
fstream fp2;
fp2.open("Temp.dat",ios::out);
fp.seekg(0,ios::beg);
while(fp.read((char*)&st,sizeof(student)))
if(strcmpi(st.retadmno(),n)!=0)
fp2.write((char*)&st,sizeof(student));
else
flag=1;
fp2.close();
fp.close();
remove("student.dat");
rename("Temp.dat","student.dat");
if(flag==1)
else
getch();
void delete_book()
char n[6];
textbackground(0);
textmode(C80);
//clrscr();
clrscr();
for (int g11=0;g11<=80;g11++)
gotoxy(g11,1);cprintf("");
gotoxy(g11,24);cprintf("");
for (g11=2;g11<=23;g11++)
gotoxy(1,g11);cprintf("");
gotoxy(79,g11);cprintf("");
for (g11=2;g11<=23;g11++)
gotoxy(2,g11);cprintf("");
gotoxy(80,g11);cprintf("");
}
textcolor(15);
gotoxy(12,4);cprintf("*************************************************************
**");
gotoxy(12,6);cprintf("*************************************************************
**");
textcolor(12);
gotoxy(30,5);cprintf("...Delete Book...");
gotoxy(15,8);textcolor(14);cprintf("Enter the book no. of the book you want to delete : ");
cin>>n;gotoxy(63,8);cout<<n;
fp.open("book.dat",ios::in|ios::out);
fstream fp2;
fp2.open("Temp.dat",ios::out);
fp.seekg(0,ios::beg);
while(fp.read((char*)&bk,sizeof(book)))
if(strcmpi(bk.retbno(),n)!=0)
fp2.write((char*)&bk,sizeof(book));
}
fp2.close();
fp.close();
remove("book.dat");
rename("Temp.dat","book.dat");
getch();
//***************************************************************
//****************************************************************
void display_alls()
clrscr();
textbackground(0);
textmode(C80);
//clrscr();
gotoxy(g11,1);cprintf("");
gotoxy(g11,24);cprintf("");
for (g11=2;g11<=23;g11++)
gotoxy(1,g11);cprintf("");
gotoxy(79,g11);cprintf("");
for (g11=2;g11<=23;g11++)
gotoxy(2,g11);cprintf("");
gotoxy(80,g11);cprintf("");
}
fp.open("student.dat",ios::in);
if(!fp)
getch();
return;
textcolor(10);
gotoxy(12,9);cprintf("*************************************************************
**");
gotoxy(12,7);cprintf("*************************************************************
**");
textcolor(14);
gotoxy(30,5);cprintf("...Student`s List...");
int rop=12;
while(fp.read((char*)&st,sizeof(student)))
{
st.report(rop);
rop=rop+1;
fp.close();
textcolor(10);
gotoxy(12,rop+2);cprintf("*********************************************************
******");
getch();
//***************************************************************
//****************************************************************
void display_allb()
textbackground(0);
textmode(C80);
//clrscr();
clrscr();
for (int g11=0;g11<=80;g11++)
gotoxy(g11,1);cprintf("");
gotoxy(g11,24);cprintf("");
for (g11=2;g11<=23;g11++)
gotoxy(1,g11);cprintf("");
gotoxy(79,g11);cprintf("");
for (g11=2;g11<=23;g11++)
gotoxy(2,g11);cprintf("");
gotoxy(80,g11);cprintf("");
fp.open("book.dat",ios::in);
if(!fp)
getch();
return;
textcolor(11);
gotoxy(10,5);cprintf("*************************************************************
*****");
gotoxy(10,7);cprintf("*************************************************************
*****");
textcolor(10);
int lop=8;
while(fp.read((char*)&bk,sizeof(book)))
bk.report(lop);lop=lop+1;
fp.close();
getch();
}
//***************************************************************
//****************************************************************
void book_issue()
char sn[6],bn[6];
int found=0,flag=0;
textbackground(0);
textmode(C80);
clrscr();
clrscr();
gotoxy(g11,1);cprintf("");
gotoxy(g11,24);cprintf("");
for (g11=2;g11<=23;g11++)
{
if (g11%2==0) textcolor(14);else textcolor(13);
gotoxy(1,g11);cprintf("");
gotoxy(79,g11);cprintf("");
for (g11=2;g11<=23;g11++)
gotoxy(2,g11);cprintf("");
gotoxy(80,g11);cprintf("");
textcolor(11);
gotoxy(15,5);cprintf("***************************************************");
gotoxy(15,7);cprintf("***************************************************");
textcolor(10);
gotoxy(32,6);cprintf("...Book Issue...");
int n67=0;
cin>>sn;
gotoxy(58,9);cout<<sn;
fp.open("student.dat",ios::in|ios::out);
fp1.open("book.dat",ios::in|ios::out);
if(strcmpi(st.retadmno(),sn)==0)
found=1;
if(st.rettoken()==0)
cin>>bn;gotoxy(45,10);cout<<bn;
while(fp1.read((char*)&bk,sizeof(book))&& flag==0)
if(strcmpi(bk.retbno(),bn)==0)
bk.show_book();
flag=1;
st.addtoken();
st.getstbno(bk.retbno());
int pos=-1*sizeof(st);
fp.seekp(pos,ios::cur);
fp.write((char*)&st,sizeof(student));
gotoxy(29,17);textcolor(14+BLINK);cprintf("Book issued
successfully");
textcolor(10);
gotoxy(10,19);cprintf("Please Note: Write current date
in backside of book and submit");
if(flag==0)
else
if(found==0)
getch();
fp.close();
fp1.close();
//***************************************************************
//****************************************************************
void book_deposit()
char sn[6],bn[6];
int found=0,flag=0,day,fine;
textbackground(0);
textmode(C80);
clrscr();
clrscr();
gotoxy(g11,1);cprintf("");
gotoxy(g11,24);cprintf("");
for (g11=2;g11<=23;g11++)
gotoxy(79,g11);cprintf("");
for (g11=2;g11<=23;g11++)
gotoxy(2,g11);cprintf("");
gotoxy(80,g11);cprintf("");
textcolor(11);
gotoxy(15,5);cprintf("***************************************************");
gotoxy(15,7);cprintf("***************************************************");
textcolor(10);
cin>>sn;
gotoxy(57,9);cout<<sn;
fp.open("student.dat",ios::in|ios::out);
fp1.open("book.dat",ios::in|ios::out);
if(strcmpi(st.retadmno(),sn)==0)
found=1;
if(st.rettoken()==1)
while(fp1.read((char*)&bk,sizeof(book))&& flag==0)
if(strcmpi(bk.retbno(),st.retstbno())==0)
bk.show_book();
flag=1;
cin>>day;gotoxy(55,18);cout<<day;
if(day>15)
fine=(day-15)*1;
st.resettoken();
int pos=-1*sizeof(st);
fp.seekp(pos,ios::cur);
fp.write((char*)&st,sizeof(student));
if(flag==0)
else
if(found==0)
getch();
fp.close();
fp1.close();
//***************************************************************
// INTRODUCTION FUNCTION
//****************************************************************
void intro()
{ int dr=9,gm=2;
initgraph( &dr,&gm,"C:\\TURBOC3\\BGI\\" );
settextstyle(4,0,5);
int h=400;
h=h-1;
char lol[90];
setcolor(10);
settextstyle(4,0,5);
sprintf(lol,"Credits to :");
outtextxy(i-20,80,lol);
char lol1[90],lol3[90],lol2[90];
settextstyle(4,0,3);
setcolor(10);
outtextxy(h,190,lol1);
setcolor(10);
sprintf(lol2,"&");
outtextxy(i+50,210,lol2);
sprintf(lol3,"Harjot Singh");
outtextxy(h,230,lol3);
delay(2);
setcolor(1);
sprintf(lol,"Credits to :");
settextstyle(4,0,5);
outtextxy(i-20,80,lol);
settextstyle(4,0,3);
sprintf(lol2,"&");
outtextxy(i+50,210,lol2);
outtextxy(h,190,lol1);
sprintf(lol3,"Harjot Singh");
outtextxy(h,230,lol3);
char lol[90],lol1[90],lol2[90],lol3[90];
setcolor(10);
sprintf(lol,"Credits to :");
settextstyle(4,0,5);
outtextxy(i-20,80,lol);
settextstyle(4,0,3);
outtextxy(h,190,lol1);
sprintf(lol2,"&");
outtextxy(i+50,210,lol2);
sprintf(lol3,"Harjot Singh");
outtextxy(h,230,lol3);
getch();
for (i=1;i<=700;i++)
setcolor(1);
rectangle(0,0,i,500);
setbkcolor(14);
circle(320,250,400);
setfillstyle(7,12);
floodfill(320,250,6);
int go=2,d=20;
float ji=450,x1,y1;
x1=100*sin(q1*3.14/180)+100;
y1=50*cos(q1*3.14/180)+100;
setcolor(6);
ji=ji-2;
line(320,ji,x1,y1);
delay(d);
}
for (q1=270 ; q1>90 ; q1=q1-go)
x1=100*sin(q1*3.14/180)+300;
y1=15*cos(q1*3.14/180)+100;
setcolor(6);
if (ji<450) {ji=ji+2;}
line(320,ji,x1,y1);
delay(d);
x1=100*sin(q1*3.14/180)+400;
y1=40*cos(q1*3.14/180)+60;
setcolor(6);
line(320,450,x1,y1);
delay(d);
x1=100*sin(q1*3.14/180)+600;
y1=40*cos(q1*3.14/180)+67;
setcolor(6);
line(320,450,x1,y1);
delay(d);
}
getch();
//***************************************************************
void rase()
{for(int p=5;p<=19;p++)
{textbackground(0);
gotoxy(40,p);cout<<l;
{"6.Create book."},
{"7.Display all books."},
{"9.Modify book."},
{"10.Delete book."},
};
void admin_menu()
{ textbackground(0);
textmode(BW80);
clrscr();
textbackground(0);
textmode(C80);
clrscr();
clrscr();
gotoxy(g11,24);cprintf("");
for (g11=2;g11<=23;g11++)
gotoxy(1,g11);cprintf("");
gotoxy(79,g11);cprintf("");
for (g11=2;g11<=23;g11++)
gotoxy(2,g11);cprintf("");
gotoxy(80,g11);cprintf("");
}
int a,j,k;float b;char ch;
//clrscr();
gotoxy(15,5);textcolor(13);cprintf("**************************************************
***");
gotoxy(15,7);textcolor(13);cprintf("**************************************************
***");
textcolor(15);
int y=10 ;
for(a=0;a<=10;a++)
{ //gotoxy(25,y);cout<<a+1<<"-> ";
gotoxy(30,y);cprintf(tem[a]);y=y+1;
y=10;gotoxy(30,10);
textbackground(4);
cprintf (tem[0]);
int c;
do
{if(y==10)
{c=0;}
ch=getch();
switch(ch)
{ case 72:if(y<=10)
{ gotoxy(30,10);
textbackground(0);
y=20;gotoxy(30,y);
textbackground(4);
cprintf(tem[10]);
else
{ gotoxy(30,y);
textbackground(0);
cprintf(tem[c]);
y=y-1;c=c-1;gotoxy(30,y);
textbackground(4);
cprintf(tem[c]);
} break;
case 80:if(y>=20)
{ gotoxy(30,20);
textbackground(0);
cprintf(tem[10]);
y=10;gotoxy(30,y);
textbackground(4);
cprintf(tem[0]);
else
{ gotoxy(30,y);
textbackground(0);
cprintf(tem[c]);
y=y+1;c=c+1;gotoxy(30,y);
textbackground(4);
cprintf(tem[c]);
break;
while(ch !=13);
textbackground(0);textcolor(7);
int n42=90;
c++;
switch(c)
{ case 1: clrscr();
write_student();break;
case 2: display_alls();break;
case 3:
char num[6];
clrscr();
textbackground(0);
textmode(C80);
clrscr();
clrscr();
gotoxy(g11,1);cprintf("");
for (g11=2;g11<=23;g11++)
gotoxy(1,g11);cprintf("");
gotoxy(79,g11);cprintf("");
for (g11=2;g11<=23;g11++)
gotoxy(2,g11);cprintf("");
gotoxy(80,g11);cprintf("");
textcolor(10);
cin>>num;gotoxy(55,6);cout<<num;
gotoxy(12,19);textcolor(13);cprintf("*************************************************
**************");
display_sps(num);
break;
case 4:
textbackground(0);
textmode(C80);
clrscr();
clrscr();
for ( g11=0;g11<=80;g11++)
gotoxy(g11,1);cprintf("");
gotoxy(g11,24);cprintf("");
for (g11=2;g11<=23;g11++)
gotoxy(79,g11);cprintf("");
for (g11=2;g11<=23;g11++)
gotoxy(2,g11);cprintf("");
gotoxy(80,g11);cprintf("");
modify_student();break;
case 5: delete_student();break;
case 6: clrscr();
write_book();break;
case 7: display_allb();break;
case 8: {
char num[6];
//clrscr();
textbackground(0);
textmode(C80);
//clrscr();
clrscr();
gotoxy(g11,1);cprintf("");
gotoxy(g11,24);cprintf("");
for (g11=2;g11<=23;g11++)
gotoxy(1,g11);cprintf("");
gotoxy(79,g11);cprintf("");
for (g11=2;g11<=23;g11++)
gotoxy(2,g11);cprintf("");
gotoxy(80,g11);cprintf("");
textcolor(11);
gotoxy(15,5);cprintf("***************************************************");
gotoxy(15,7);cprintf("***************************************************");
textcolor(10);
cin>>num;gotoxy(55,10);cout<<num;
n42=0;
display_spb(num,n42);
break;
}
case 9:
textbackground(0);
textmode(C80);
//clrscr();
clrscr();
for ( g11=0;g11<=80;g11++)
gotoxy(g11,1);cprintf("");
gotoxy(g11,24);cprintf("");
for (g11=2;g11<=23;g11++)
gotoxy(1,g11);cprintf("");
gotoxy(79,g11);cprintf("");
for (g11=2;g11<=23;g11++)
gotoxy(2,g11);cprintf("");
gotoxy(80,g11);cprintf("");
textcolor(11);
gotoxy(15,5);cprintf("***************************************************");
gotoxy(15,7);cprintf("***************************************************");
textcolor(10);
default:cout<<"\a";
getchar();
// cout<<"\n\n\n\tADMINISTRATOR MENU";
// cout<<"\n\n\t
// cout<<"\n\n\t
// Ucout<<"\n\n\t
// cout<<"\n\n\t
//P cout<<"\n\n\t
// cout<<"\n\n\t
// cout<<"\n\n\t
// cout<<"\n\n\t
// cout<<"\n\n\t
// cout<<"\n\n\t
// cout<<"\n\n\t
//***************************************************************
//****************************************************************
void erase()
{for(int pp=5;pp<=19;pp++)
{textbackground(0);
gotoxy(40,pp);cout<<s;
};
int main()
int dr=9,gm=2;
initgraph( &dr,&gm,"C:\\TURBOC3\\BGI\\" );
//delay (2000);
int d,a2,b4,x,z,i3,r7;
char a1[90],m[80],s[80],g[80],g1[10],g2[20],g3[20];
int x11,y11=0,x22,y22,x33,y33,j6;
r7=0;
x11=getmaxx()/2;
j6=0;i3=0;
setbkcolor(9);
while(r7<=295)
i3++;
if (y11<=490)y11=y11+5;
else
cleardevice();
y11=0;
}
for (j6;j6<=(i3*4);j6++)
setcolor(15);
settextstyle(7,1,4);
char sp[90],dp[90];
sprintf(sp,"LOADING. . . .");
outtextxy(50,80,sp);
outtextxy(80,20,dp);
setcolor(14);
x22=100*sin(j6*3.14/180)+x11;
y22=30*cos(j6*3.14/180)+y11;
x33=(2*x11)-x22;
y33=(2*y11)-y22;
line(x22,y22,x33,y33);
line(x22,y22-3,x33,y33-3);
setcolor(2);
circle(x22,y22,8);
circle(x33,y33,8);
setcolor(5);
circle(x22,y22,5);
circle(x33,y33,5);
setcolor(1);
circle(x22,y22,3);
circle(x33,y33,3);
setcolor(0);
line(x22,y22,x33,y33);
r7=r7+1;
setbkcolor(0);
setcolor(13);
circle (320,250,800);
setfillstyle (8,13);
floodfill (320,250,13);
delay(10);
setbkcolor(14);
setcolor(14);
circle (320,250,i3);
setfillstyle (8,14);
settextstyle(p,0,5);
setcolor(1);
outtextxy(120,15,m);
delay(110);
settextstyle(p,0,5);
setcolor(0);
outtextxy(120,15,m);
settextstyle(4,0,5);
setcolor(1);
outtextxy(120,15,m);
settextstyle(l,0,5);
setcolor(1);
outtextxy(255,65,s);
delay(110);
setcolor(0);
settextstyle(l,0,5);
outtextxy(255,65,s);
settextstyle(4,0,5);
setcolor(1);
outtextxy(255,65,s);
int s23=0;
setcolor(2);
rectangle (0,0,95,t);
setfillstyle (4,12);
floodfill (0,0,2);
delay(5);
z=25;
a2=130;
int b5;
b5=250;
x=355;
for(int q=16; q>1 ; q=q-1)
settextstyle(7,0, 9) ;
setcolor(0);
sprintf(g,"2",2);
outtextxy( z,q,g);
a2=a2-1;
settextstyle(7,0, 9) ;
setcolor(0);
sprintf(g1,"0",2);
outtextxy( z,a2,g1);
b5=b5-1;
settextstyle(7,0, 9) ;
setcolor(0);
sprintf(g2,"1",2);
outtextxy( z,b5,g2);
x=x-1;
settextstyle(7,0, 9) ;
setcolor(0);
sprintf(g3,"7",2);
outtextxy( z,x,g3);
delay(50);
setcolor(1);
sprintf(g,"2",2);
outtextxy( z,q,g);
settextstyle(7,0, 9) ;
setcolor(1);
sprintf(g1,"0",2);
outtextxy( z,a2,g1);
settextstyle(7,0, 9) ;
setcolor(1);
sprintf(g2,"1",2);
outtextxy( z,b5,g2);
settextstyle(7,0, 9) ;
setcolor(1);
sprintf(g3,"7",2);
outtextxy( z,x,g3);
settextstyle(7,0,9) ;
setcolor(0);
sprintf(g,"2",2);
outtextxy(z,1,g);
settextstyle(7,0,9) ;
setcolor(0);
sprintf(g1,"0",2);
outtextxy(z,114,g1);
settextstyle(7,0,9) ;
setcolor(0);
sprintf(g2,"1",2);
outtextxy(z,234,g2);
settextstyle(7,0, 9) ;
setcolor(0);
sprintf(g3,"7",2);
outtextxy(z,339,g3);
setcolor(13);
settextstyle(4,0,2);
sprintf(a1,"",2);
setcolor(11);
outtextxy(1,u,a1);
setcolor(13);
outtextxy(97,u,a1);
outtextxy(622,u,a1);
char k1[90];
char k2[90];
char k3[90];
char k4[90];
char k5[90];
char k6[90];
char k7[90];
char k8[90];
float x1,y1;
x1=25*sin(q1*3.14/180)+220;
y1=200*cos(q1*3.14/180)+250;
setcolor(6);
circle(x1,y1,2);
setfillstyle(1,6);
floodfill(x1,y1,6);
float x8,y8;
x8=25*sin(q8*3.14/180)+290;
y8=200*cos(q8*3.14/180)+250;
setcolor(6);
circle(x8,y8,2);
setfillstyle(1,6);
floodfill(x8,y8,6);
float x3,y3;
x3=25*sin(q3*3.14/180)+460;
y3=200*cos(q3*3.14/180)+250;
setcolor(6);
circle(x3,y3,2);
setfillstyle(1,6);
floodfill(x3,y3,6);
float x4,y4;
x4=25*sin(q4*3.14/180)+530;
y4=200*cos(q4*3.14/180)+250;
setcolor(6);
circle(x4,y4,2);
setfillstyle(1,6);
floodfill(x4,y4,6);
setcolor(6);
circle(x5,250,2);
setfillstyle(1,6);
floodfill(x5,250,6);
setcolor(6);
circle(x5,250,2);
setfillstyle(1,6);
floodfill(x5,250,6);
setcolor(6);
circle(x5,450,2);
setfillstyle(1,6);
floodfill(x5,450,6);
setcolor(6);
circle(x5,450,2);
setfillstyle(1,6);
floodfill(x5,450,6);
floodfill(500,420,6);
floodfill(250,420,6);
setcolor(2);
rectangle (200,150,540,230);
setfillstyle(1,2);
floodfill(230,170,2);
setcolor(10);
circle(x5,151,20);
setfillstyle(1,10);
floodfill(x5,151,10);
setcolor(10);
circle(x5,171,20);
setfillstyle(1,10);
floodfill(x5,171,10);
setcolor(10);
circle(x5,201,20);
setfillstyle(1,10);
floodfill(x5,201,10);
setcolor(10);
circle(x5,221,20);
setfillstyle(1,10);
floodfill(x5,230,10);
}
for (x5=200 ; x5<540 ; x5=x5+30)
setcolor(10);
circle(x5,231,20);
setfillstyle(1,10);
floodfill(x5,241,10);
setcolor(12);
circle (200,200,9);
setfillstyle(1,12);
floodfill(200,200,12);
setcolor(12);
circle (230,230,9);
setfillstyle(1,12);
floodfill(230,230,12);
setcolor(12);
circle (290,170,9);
setfillstyle(1,12);
floodfill(290,170,12);
setcolor(12);
circle (300,210,9);
setfillstyle(1,12);
floodfill(300,210,12);
setcolor(12);
circle (340,240,9);
setfillstyle(1,12);
floodfill(340,240,12);
setcolor(12);
circle (330,215,9);
setfillstyle(1,12);
floodfill(330,215,12);
setcolor(12);
circle (390,170,9);
setfillstyle(1,12);
floodfill(390,170,12);
setcolor(12);
circle (370,180,9);
setfillstyle(1,12);
floodfill(370,180,12);
setcolor(12);
circle (410,215,9);
setfillstyle(1,12);
floodfill(410,215,12);
setcolor(12);
circle (410,190,9);
setfillstyle(1,12);
floodfill(410,190,12);
setcolor(12);
circle (430,200,9);
setfillstyle(1,12);
floodfill(430,200,12);
setcolor(12);
circle (470,200,9);
setfillstyle(1,12);
floodfill(470,200,12);
setcolor(12);
circle (500,165,9);
setfillstyle(1,12);
floodfill(500,165,12);
setcolor(12);
circle (530,215,9);
setfillstyle(1,12);
floodfill(530,215,12);
setcolor(12);
circle (500,215,9);
setfillstyle(1,12);
floodfill(500,215,12);
setcolor(15);
rectangle (230,290,520,310);
setfillstyle(1,15);
floodfill(250,300,15);
setcolor(1);
rectangle (230,290,520,310);
setcolor(15);
rectangle (230,350,520,370);
setfillstyle(1,15);
floodfill(250,360,15);
setcolor(1);
rectangle (230,350,520,370);
char w1[90],w2[90];
settextstyle(2,0,4);
sprintf(w1,"A R B O R S C I E N T A E",2);
outtextxy(300,292,w1);
settextstyle(2,0,4);
sprintf(w2,"A R B O R V I T A E",2);
outtextxy(320,352,w2);
getch();
rectangle(0,0,i9,550);
//floodfill(320,250,1);
setcolor(15);
circle(320,250,r2);
delay(5);
setcolor(1);
settextstyle(4,0,5);
outtextxy(220,40,"PREFACE");
settextstyle(1,0,3);
getch();
//closegraph();
//clrscr();
rectangle(0,0,i9,550);
for (r2=400;r2>0;r2=r2-1)
setcolor(15);
circle(320,250,r2);
delay(5);
setcolor(1);
settextstyle(4,0,5);
outtextxy(90,40,"ACKNOWLEDGEMENT");
settextstyle(1,0,3);
outtextxy(35,270,"thank our friends Harsh and Sameer who provided us with the");
getch();
/*
setcolor(15);
delay(1);
rectangle(0,0,700,i9);
}
//char k2[99];
setcolor(13);
circle(320,250,i9);
delay(1);
setcolor(14);
sprintf(k2,"",2);
settextstyle(4,0,3);
outtextxy(i9,1,k2);
setcolor(14);
sprintf(k2,"",2);
settextstyle(4,0,3);
outtextxy(i9,440,k2);
// char k8[99];
setcolor(4);
sprintf(k8,"Program on Library-Management",5);
settextstyle(4,0,4);
outtextxy(120,50,k8);
int rh=185 ;
char k9[99];
//settextstyle(4,0,3);
setcolor(1);
for(i9=0;i9<=3;i9++)
//sprintf(k8,"",4);
//outtextxy(150,rh,k8);
settextstyle(5,0,3);
strcpy(k9,item[i9]);
outtextxy(200,rh,k9);
rh=rh+40;
//getch();
*/
top:
textbackground(0);
textmode(C80);
clrscr();
clrscr();
gotoxy(g11,1);cprintf("");
gotoxy(g11,24);cprintf("");
for (g11=2;g11<=23;g11++)
gotoxy(1,g11);cprintf("");
gotoxy(79,g11);cprintf("");
}
for (g11=2;g11<=23;g11++)
gotoxy(2,g11);cprintf("");
gotoxy(80,g11);cprintf("");
gotoxy(23,5);
textcolor(10);
int hj=20;
for (j=4;j<=21;j++)
textcolor(10);
gotoxy(21,j);
cprintf("****************************************");
// int h,u;
for (i=21;i>=5;i--)
{
u=i;
gotoxy(23,i);
h=(-1)*(i-22);
for(int l=1;l<=h;l++)
for(int g=1;g<=l;g++)
textcolor(0);
cprintf("**");
u++;
gotoxy(23,u);
delay(50);
}
for (t=21;t>=5;t--)
b=57;
for (j=t;j>=5;j--)
textcolor(0);
gotoxy(b,j);
cprintf("**");
b=b-2;
delay(50);
textcolor(14);gotoxy(17,5);
gotoxy(20,6);
cprintf("************************************");
textcolor(12);
textcolor(5);gotoxy(37,10);cprintf("2016-17");
textcolor(15);
int r=12 ;
int jk=r;
for(i=0;i<=3;i++)
{ gotoxy(30,r);cprintf(item[i]);r=r+2;
r=12;
gotoxy(30,jk);
textbackground(4);
cprintf (item[0]);
int c;
do
{if(r==11) {c=0;}
else {c=(r/2)-6;}
ch=getch();
switch(ch)
{ case 72:if(r<=jk)
{ gotoxy(30,jk);
textbackground(0);
r=jk+6;gotoxy(30,r);
textbackground(4);
cprintf(item[3]);
else
{ gotoxy(30,r);
textbackground(0);
cprintf(item[c]);
r=r-2;c=c-1;gotoxy(30,r);
textbackground(4);
cprintf(item[c]);
} break;
case 80:if(r>=jk+6)
{ gotoxy(30,jk+6);
textbackground(0);
cprintf(item[3]);
r=jk;gotoxy(30,r);
textbackground(4);
cprintf(item[0]);
else
{ gotoxy(30,r);
textbackground(0);
cprintf(item[c]);
r=r+2;c=c+1;gotoxy(30,r);
textbackground(4);
cprintf(item[c]);
break;
while(ch !=13);
textbackground(0);textcolor(7);
c++;
//intro();
switch(c)
{ case 1:clrscr();
book_issue();
goto top;
break;
case 2:book_deposit();
goto top;
break;
case 3:admin_menu();
goto top;
break;
case 4 :intro();exit(0);
default :cout<<"\a";
getchar();
return 0;
//***************************************************************
// END OF PROJECT