Mobile Phone System
Source Code
/******************************************************
PROJECT ON
MOBILE PHONE
Name: Hitesh Kumar
Language: C\C++
Password------ hitesh
**********************************************************/
//INCLUDES HEADER FILES
//**********************************************************
/*It is the project of a cellphone,,,,
its the virtual image of how a orignal mobile works,,,
although it cannot be compared to the orignal cellphone
but the attempt on few things have been dreamed like orignal....*/
//accesscode/password to run this program is :- "hitesh"
//the running of this program may vary from system to system,because of
//the use of graphics & different system configurations...........
//in some computers if the project doesn't run after compiling then perform
//these actions :-
//>>>> click on FILE ,,, then click DOS SHELL ,,,,, then write these codes:-
// cd..
// cd bgi
// exit
//& then compile the program will run ..................
#include<fstream.h>
#include<conio.h>
#include<stdio.h>
#include<string.h>
#include<ctype.h>
#include<dos.h>
#include<process.h>
#include<stdlib.h>
#include <ctype.h>
#include<graphics.h>
#include <iomanip.h>
#define xy(z) (8*(z-1))
// GLOBAL Funcions
void grap();
void intro();
void box();
void mainwindow();
void grap();
void intro();
void closeprog();
void quit();
int option,pass,i,access,x,y,status;
char year[10],ch,name[100],temp[200],newfile[100],a[50],mod;
void *p;
class mobile
{ char name[20];
char phno[14];
public:
int mainscreen();
void getdata();
void showdata();
int checkphno(char p[]);
int checkname(char s[]);
int check(char cellno[],char s[]);
int menu();
};
void phonebook();
void messages();
void calculator();
void introduction();
//this funtion is used to show the time on r.h.s
void showtime()
{
struct time t;
gettime(&t);
printf(" %2d:%02d:%02d.%02d\n",
t.ti_hour, t.ti_min, t.ti_sec, t.ti_hund);
};
int mobile :: mainscreen()
{
char ch;
clrscr();
gotoxy(40,2);
gotoxy(45,1);showtime();
gotoxy(3,5);
cout<<"LOADING PLZ WAIT";
textcolor(LIGHTGRAY+BLINK);
gotoxy(19,5);
cprintf(". . . . . . . . .");
textcolor(LIGHTGRAY);
delay(5000);
clrscr();
gotoxy(45,1);showtime();
gotoxy(29,7);
cout<<"****** M O B I L E ******";
gotoxy(29,12);
cout<<"****** P H O N E ******";
gotoxy(29,17);
cout<<"***** P R O J E C T *****";
delay(5000);
menu();
return 0;
}
// Main Window Function
void mainwindow()
{
clrscr();
gotoxy(45,1);showtime();
gotoxy(26,4);cout<<"IT'S THE PROJECT OF A MOBILE PHONE ";
gotoxy(26,5);cout<<"===================================";
gotoxy(26,8);cout<<"MADE BY.....";
gotoxy(26,10);cout<<"hitesh";
gotoxy(26,12);cout<<" ";
gotoxy(26,14);cout<<" ";
gotoxy(26,16);cout<<"Press 0 To CONTINUE......";
gotoxy(26,18);cout<<"Option -----> ";
cin>>option;
};
// INTRODUCTION SCREEN
void intro()
{
int a,b,c,d;
setfillstyle(8,1);
for(a=0,b=getmaxx(),c=getmaxx()/2,d=getmaxx()/2;a<getmaxx()/2+3;a+=5,b-=5,
c-=5,d+=5)
{
line(c,xy(8),d,xy(8));line(c,xy(51),d,xy(51));
bar(0,xy(9),a,xy(50));bar(b,xy(9),getmaxx(),xy(50));
sound(10*(a+250));delay(10);
}
nosound();
char pattern[] ={0xfe,0xbc,0xda,0xe4,0xe2,0xc0,0x88,0x00};
setfillpattern(pattern,1);
bar(0,0,640,480);
settextstyle(1,0,3);
setcolor(10);
outtextxy(100,140,"**** PROJECT OF A MOBILE PHONE ****");
outtextxy(300,400,"PRESS ENTER TO CONTINUE....");
getch();
setcolor(0);
for(i=0;i<=320;i++)
{
rectangle(0+i,0,640-i,480);
delay(5);
}
closegraph();
}
void introduction()
{
clrscr() ;
gotoxy(45,1);showtime();
gotoxy(26,2);
cout<<"*******THE POWER OF IMAGING*******";
gotoxy(26,6);
cout<<"INTRODUCTION TO A MOBILE PHONE.....";
gotoxy(9,10);
cout<<"In your hand, the MOBILE instantly becomes a power tool";
gotoxy(9,11);
cout<<"for your imagination - with its integrated Camera and Video";
gotoxy(9,12);
cout<<"Recorder with zoom. Its multimedia capabilities mean you can";
gotoxy(9,13);
cout<<"always enjoy rich colour mobile content at your command. But";
gotoxy(9,14);
cout<<"that's not all. You can better manage your life with its";
gotoxy(9,15);
cout<<"distinct features like Bluetooth, Syncml, Infrared.And assert";
gotoxy(9,16);
cout<<"your personality with a series of Themes, Java applications";
gotoxy(9,17);
cout<<"and Games on your phone. With the MOBILE, you can always";
gotoxy(9,18);
cout<<"be sure that the power is yours.";
textcolor(LIGHTGRAY+BLINK);
gotoxy(9,25);
cprintf("Press any key to continue.........");
textcolor(LIGHTGRAY);
getch();
}
int mobile :: menu()
{
char ch ;
while (ch!=27&&ch!='0')
{
clrscr();
gotoxy(45,1);showtime();
gotoxy(29,5);
cout<<"M O B I L E M E N U";
gotoxy(28,6);
cout<<"~~~~~~~~~~~~~~~~~~~~~~";
gotoxy(30,10);
cout<<"[ 1. INTRODUCTION ]";
gotoxy(30,12);
cout<<"[ 2. PHONEBOOK ]";
gotoxy(30,14);
cout<<"[ 3. MESSAGES ]";
gotoxy(30,16);
cout<<"[ 4. CALCULATOR ]";
gotoxy(30,18);
cout<<"[ 0. QUIT ]";
gotoxy(30,24);
cout<<" Enter your choice : ";
ch=getche();
if(ch == '1')
introduction();
else
if(ch == '2')
phonebook();
else
if (ch == '3')
messages();
else
if (ch == '4')
calculator();
else
closeprog();
}
return 0;
}
void appendfile()
{
char ch;
fstream file ;
file.open("CELL.DAT", ios::binary|ios::app);
mobile m1;
do
{
m1.getdata();
file.write((char*)&m1,sizeof(m1));
clrscr();
gotoxy(10,10);
cout<<"Entry Saved";
gotoxy(10,20);
cout<<"More(Y/N) ?";
cin>>ch;
}
while(toupper(ch)=='Y');
file.close();
}
void searchfile()
{
int ch;
clrscr();
fstream file;
mobile m2;
int found=0;
file.open("CELL.DAT",ios::binary|ios::in);
clrscr();
gotoxy(10,10);
cout<<"Search by:"<<endl<<"1. Phone number"<<endl;
cout<<"2. Name"<<endl;
cout<<"Enter choice : ";
cin>>ch;
if(ch==1)
{ clrscr();
char search[14];
gotoxy(10,10);
cout<<"Enter the phone number to be searched : ";
gets(search);
cout<<search;
file.read((char*)&m2,sizeof(m2));
while(!file.eof())
{ if(m2.checkphno(search)==1)
{ m2.showdata();
found++;
}
file.read((char*)&m2,sizeof(m2));
}
file.close();
}
if(ch==2)
{ clrscr();
gotoxy(5,8);
char search[20];
clrscr();
gotoxy(10,10);
cout<<"Enter the name to be searched : ";
gets(search);
file.read((char*)&m2,sizeof(m2));
while(!file.eof())
{ if(m2.checkname(search)==1)
{ m2.showdata();
found++;
}
file.read((char*)&m2,sizeof(m2));
}
file.close();
}
if(found==0)
{ clrscr();
gotoxy(30,12);
cout<<"***ERROR***";
gotoxy(20,16);
cout<<"phone number not existing. press any key to continue.";
getch();
}
else
cout<<"TOTAL"<<found<<"MATCH FOUND";
}
void eraserec()
{
clrscr();
fstream file1,file2;
mobile m;
char phdir[14];
file1.open("CELL.DAT",ios::binary|ios::in);
file2.open("TEMP.DAT",ios::binary|ios::out);
gotoxy(5,5);
cout<<"Enter the phone number to be deleted : ";
gotoxy(5,8);
cout<<"phone number ? ";
gets(phdir);
int del=0;
while(file1.read((char*)&m,sizeof(m)))
{ if(m.checkphno(phdir)==1)
del++;
else
file2.write((char*)&m,sizeof(m));
}
file1.close();
file2.close();
remove("CELL.DAT");
rename("TEMP.DAT","CELL.DAT");
if(del==0)
{ clrscr();
gotoxy(10,10);
cout<<"NOT EXISTING IN THE CELL MEMORY : ";
getch();
}
else
{ clrscr();
gotoxy(10,10);
cout<<"PHONE NUMBER DELETED";
cout<<"UPDATING PHONE BOOK.........";
delay(500);
gotoxy(10,15);
cout<<"phone book updated : ";
getch();
}
}
void displayfile()
{ int flag=0;
char choice;
fstream file;
mobile m;
file.open("CELL.DAT", ios::binary|ios::in);
while(file.read((char*)&m,sizeof(m)) && !flag)
{
m.showdata();
clrscr();
gotoxy(10,20);
cout<<"Enter to continue";
gotoxy(10,30);
cout<<"<Q>uit to return back ";
choice=getch();
if(toupper(choice)=='Q')
flag++;
}
}
void modify()
{ clrscr();
mobile m;
char sname[20];
gotoxy(5,10);
cout<<"Enter the name whose number is to be modified : ";
gets(sname);
fstream file1,file2;
file1.open("CELL.DAT",ios::binary|ios::in);
file2.open("TEMP.DAT",ios::binary|ios::out);
file1.read((char*)&m,sizeof(m));
while(!file1.eof())
{ if(m.checkname(sname)==1)
m.getdata();
file2.write((char*)&m,sizeof(m));
file1.read((char*)&m,sizeof(m));
}
file1.close();
file2.close();
remove("CELL.DAT");
rename("TEMP.DAT","CELL.DAT");
}
void phonebook()
{
clrscr();
char mch;
do
{ clrscr();
gotoxy(45,1);showtime();
gotoxy(29,5);
cout<<"*****P H O N E B O O K******";
gotoxy(28,6);
cout<<"~~~~~~~~~~~~~~~~~~~";
gotoxy(30,10);
cout<<"1. Search Entry ";
gotoxy(30,12);
cout<<"2. Add Entry ";
gotoxy(30,14);
cout<<"3. Erase Entry ";
gotoxy(30,16);
cout<<"4. List ";
gotoxy(30,18);
cout<<"5. Modify ";
gotoxy(30,20);
cout<<"6. Back ";
gotoxy(30,22);
cout<<"Enter the choice : ";
mch=getche();
if(mch=='1')
searchfile();
if(mch=='2')
appendfile();
if(mch=='3')
eraserec();
if(mch=='4')
displayfile();
if(mch=='5')
modify();
}
while(mch!='6');
}
void mobile :: getdata()
{
clrscr();
gotoxy(45,1);showtime();
gotoxy(10,10);
cout<<"ENTER NAME : ";
gets(name);
gotoxy(10,15);
cout<<"ENTER PHONE NUMBER : ";
gets(phno);
cout<<phno;
}
void mobile :: showdata()
{
clrscr();
gotoxy(45,1);showtime();
gotoxy(10,10);
cout<<"NAME : "<<name;
gotoxy(10,15);
cout<<"PHONE NUMBER : "<<phno;
cout<<endl<<endl;
cout<<"Press any key to go back..........";
getch();
}
int mobile :: checkphno(char *p)
{
if(strcmp(p,phno)==0)
return 1;
else
return 0;
}
int mobile :: checkname(char *search)
{
if(strcmp(search,name)==0)
return 1;
else
return 0;
}
int mobile :: check(char cellno[],char s[])
{
if(strcpy(cellno,phno)==0)
{ strcpy(s,name);
return 1;
}
else
return 0;
}
//MAIN FUNCTION
void main()
{
clrscr();
// mobile m;
//m.mainscreen()
int gd=DETECT,gm;
initgraph(&gd,&gm,"c:\\tc\\bgi");
grap();
a:clearviewport();
i=0;
rectangle(getmaxx()/2-140,getmaxy()/2-20,getmaxx()/2+135,getmaxy()/2+4);
outtextxy(getmaxx()/2-127,getmaxy()/2-12,"Enter Accesscode:");
gotoxy(43,15);
//Password Code
do
{
pass=getch();
if(pass==13) goto b;
a[i]=char(pass);
cout<<"*";
sound(500);delay(100);nosound();
i++;
}while(pass!=13);
b:a[i]=0;
access=stricmp(a,"hitesh");
if(access==0)
{
cout<<"\n\n\n\nAccess Granted .........";
delay(1000);
intro();
textcolor(BLACK);
textbackground(YELLOW);
mainwindow();
}
else
{
clearviewport();
cout<<"\n\nUnautorised Access ";
cout<<"\nPress Any Key To Continue......... ";
getch();
goto a;
}
int car,len;
char *text,*text1,*text2,*text3,*text4,*text5;
{ clrscr();
gotoxy(45,1);showtime();
cout<<"Please wait.....................";
cout<<endl<<"Project is being loaded.........";
sound(4000);
delay(3000);
nosound();
}
clrscr();
gotoxy(45,1);showtime();
text=" THIS PROJECT CONTAINS THE FOLLOWING PROCESSES.......";
len=strlen(text);
for(int a=0;a<len;a++)
{for(double b=0;b<=9999;b++)
{sound(b);}
cout<<text[a];
}
nosound();
delay(2500);
cout<<"\n\n\n\n\n\n\n\n"<<"\t\t\t";
gotoxy(28,6);
text1="[ INTRODUCTION ]";
len=strlen(text1);
for(int a1=0;a1<len;a1++)
{for(double b1=0;b1<=9999;b1++)
{sound(b1);}
cout<<text1[a1];
}
nosound();
delay(2000);
cout<<"\n\n\n"<<"\t\t\t";
gotoxy(28,8);
text2="[ PHONEBOOK ]";
len=strlen(text2);
for(int a2=0;a2<len;a2++)
{for(double b2=0;b2<=9999;b2++)
{sound(b2);}
cout<<text2[a2];
}
nosound();
delay(1000);
cout<<"\n\n\n"<<"\t\t\t";
gotoxy(28,10);
text3="[ MESSAGES ]";
len=strlen(text3);
for(int a3=0;a3<len;a3++)
{for(double b3=0;b3<=9999;b3++)
{sound(b3);}
cout<<text3[a3];
}
nosound();
delay(900);
cout<<"\n\n\n"<<"\t\t\t";
gotoxy(28,12);
text4="[ CALCULATOR ]";
len=strlen(text4);
for(int a4=0;a4<len;a4++)
{for(double b4=0;b4<=9999;b4++)
{sound(b4);}
cout<<text4[a4];
}
nosound();
delay(300);
mobile m;
gotoxy(45,1);showtime();
m.mainscreen();
getch();
}
// DETECTION OF GRAPHICS
void grap()
{
int gd= DETECT, gm, errorcode;
initgraph(&gd, &gm, "d:\\tc\\bgi");
errorcode = graphresult();
if(errorcode != grOk)
{
printf("Graphics error: %s", grapherrormsg(errorcode));
exit(1);
}
}
//////////////// MESSAGES/////////////////
void searchname(char phno[], char s1[])
{ clrscr();
int k=0;
mobile m1;
fstream file1;
file1.open("CELL.DAT",ios::binary|ios::in);
file1.read((char*)&m1,sizeof(m1));
while(!file1.eof())
{ if(m1.check(phno,s1)==1)
k++;
file1.read((char*)&m1,sizeof(m1));
}
if(k==0)
strcpy(s1,"user");
file1.close();
}
class sms
{ char msg[160];
char pno[14];
public:
void input(char s[]);
void output();
int check(char search[]);
int check(unsigned long);
void show();
};
void sms :: show()
{ cout<<endl<<"** ";
for (int j=0;j<7;j++)
cout<<msg[j];
cout<<endl<<" "<<pno<<endl;
}
int sms::check(unsigned long a)
{
}
void sms :: input(char s[])
{ clrscr();
gotoxy(10,8);
cout<<"TYPE YOUR MESSAGE : ";
gets(msg);
gotoxy(10,12);
cout<<"ENTER THE PHONE NUMBER : ";
gets(pno);
searchname(pno,s);
}
void sms :: output()
{ clrscr();
char name[20];
searchname(pno,name);
gotoxy(10,8);
cout<<"THE MESSAGE IS : "<<msg;
gotoxy(10,12);
cout<<"PHONE NUMBER : "<<pno;
gotoxy(10,14);
cout<<"NAME : "<<name;
gotoxy(10,20);
cout<<"[ENTER]";
getch();
}
int sms :: check(char search[])
{ if(strcpy(pno,search))
return 1;
else
return 0;
}
unsigned long displaymsg(char fname[])
{ clrscr();
fstream file;
sms s;
unsigned long search1;
file.open(fname,ios::binary|ios::in);
file.read((char*)&s,sizeof(s));
while(!file.eof()) {
s.show();
file.read((char*)&s,sizeof(s));
}
cout<<endl<<"\nENTER THE PHONE NUMBER TO SEE THE DETAILED FORMAT: ";
cin>>search1;
file.close();
return search1;
}
void storemsg()
{ clrscr();
gotoxy(45,1);showtime();
fstream file;
sms s1;
char n1[20];
s1.input(n1);
file.open("INBOX.DAT",ios::binary|ios::app);
gotoxy(10,8);
cout<<"THIS MESSAGE HAS BEEN SENT BY "<<n1;
gotoxy(10,12);
cout<<"STORING THE MESSAGE OF "<<n1;
gotoxy(10,16);
cout<<"Please Wait..............";
file.write((char*)&s1,sizeof(s1));
delay(3000);
cout<<"\n\n\nMESSAGE STORED";
getch();
file.close();
}
void sendmsg()
{ clrscr();
gotoxy(45,1);showtime();
fstream file;
sms s2;
char n2[20];
s2.input(n2);
file.open("OUTBOX.DAT",ios::binary|ios::app);
gotoxy(10,10);
cout<<"DESTINATION : "<<n2;
file.write((char*)&s2,sizeof(s2));
file.close();
getch();
}
void readmsg()
{ char ch;
clrscr();
gotoxy(45,1);showtime();
unsigned long search1;
fstream file;
sms s3;
char fname[12];
gotoxy(10,8);
cout<<"ENTER <1>IF YOU WANT TO READ MESSAGES IN STORED MESSAGES";
gotoxy(10,10);
cout<<"ENTER <2>IF YOU WANT TO READ MESSAGES THAT HAVE BEEN SENT ";
int found=0;
gotoxy(15,14);
cout<<"Enter your choice : ";
cin>>ch;
if(ch=='1')
{ strcpy(fname,"INBOX.DAT");
search1=displaymsg(fname);
file.open("INBOX.DAT",ios::binary|ios::in);
file.read((char*)&s3,sizeof(s3));
while(!file.eof())
{ if(s3.check(search1)==1)
{ s3.output();
found++;
}
file.read((char*)&s3,sizeof(s3));
}
}
else
if(ch=='2')
{ strcpy(fname,"OUTBOX.DAT");
search1=displaymsg(fname);
file.open("OUTBOX.DAT",ios::binary|ios::in);
file.read((char*)&s3,sizeof(s3));
while(!file.eof())
{ if(s3.check(search1)==1)
{ s3.output();
found++;
}
file.read((char*)&s3,sizeof(s3));
}
}
file.close();
if(found==0)
{ clrscr();
gotoxy(27,10);
cout<<" ERROR ";
delay(1000);
gotoxy(20,12);
cout<<"Message does not exist !";
getch();
}
}
void delmsg()
{ clrscr();
gotoxy(45,1);showtime();
char ch;
int del=0;
gotoxy(10,8);
cout<<"ENTER <1>IF YOU WANT TO DELETE STORED MESSAGES ";
gotoxy(10,10);
cout<<"ENTER <2>IF YOU WANT TO DEL. MESSAGES FROM THE OUTBOX ";
gotoxy(10,15);
cout<<"Enter your choice :";
cin>>ch;
unsigned long search1;
fstream file1,file2;
sms s4;
clrscr();
gotoxy(10,10);
cout<<"ENTER THE PHONE NUMBER : ";
cin>>search1;
if(ch=='1')
{ file2.open("INBOX.DAT",ios::binary|ios::in);
file1.open("TEMP.DAT",ios::binary|ios::out);
file2.read((char*)&s4,sizeof(s4));
while(!file2.eof())
{ if(s4.check(search1)==1)
{ del++;
gotoxy(20,15);
cout<<"DELETING MESSAGE.....";
delay(2000);
gotoxy(20,20);
cout<<"MESSAGE DELETED ";
}
else
file1.write((char*)&s4,sizeof(s4));
file2.read((char*)&s4,sizeof(s4));
}
file1.close();
file2.close();
remove("INBOX.DAT");
rename("TEMP.DAT","INBOX.DAT");
}
if(ch=='2')
{ file2.open("OUTBOX.DAT",ios::binary|ios::in);
file1.open("TEMP.DAT",ios::binary|ios::out);
file2.read((char*)&s4,sizeof(s4));
while(!file2.eof())
{ if(s4.check(search1)==1)
{ del++;
gotoxy(20,15);
cout<<"DELETING MESSAGE.....";
delay(200);
gotoxy(20,20);
cout<<"MESSAGE DELETED ";
}
else
file1.write((char*)&s4,sizeof(s4));
file2.read((char*)&s4,sizeof(s4));
}
file1.close();
file2.close();
remove("OUTBOX.DAT");
rename("TEMP.DAT","OUTBOX.DAT");
}
if(del==0)
{ clrscr();
gotoxy(10,10);
cout<<"Not Existing In The Cell Memory ";
getch();
}
}
void messages()
{
char cho;
do
{
clrscr();
gotoxy(45,1);showtime();
gotoxy(29,5);
cout<<"****** M E S S A G E S *******";
gotoxy(28,6);
cout<<"~~~~~~~~~~~~~~~~~";
gotoxy(29,10);
cout<<"1. STORE MESSAGES";
gotoxy(29,12);
cout<<"2. SEND MESSAGES ";
gotoxy(29,14);
cout<<"3. READ MESSAGES";
gotoxy(29,16);
cout<<"4. DELETE STORED MESSAGES";
gotoxy(29,18);
cout<<"5. BACK";
gotoxy(29,20);
cout<<"Enter your choice : ";
cho=getche();
if(cho=='1')
storemsg();
if(cho=='2')
sendmsg();
if(cho=='3')
readmsg();
if(cho=='4')
delmsg();
}
while(cho!='5');
}
////////////CALCULATOR///////////
void calculator()
{ clrscr();
gotoxy(45,1);showtime();
int i=0;
float res=0,a=0;
gotoxy(15,12);
cout<<"YOU CAN PROCEED WITH ONE CALCULATION AT A TIME";
gotoxy(15,15);
cout<<" THE NUMBER YOU WILL TAKE ONCE ,,,WITH THAT NUMBER ONLY";
gotoxy(15,18);
cout<<"ALL THE CALCULATIONS WILL BE PERFORMED";
delay(6000);
clrscr();
char cch;
do
{ clrscr();
i++;
gotoxy(26,5);
cout<<"****** C A L C U L A T O R ********";
gotoxy(26,6);
cout<<"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~";
gotoxy(30,10);
cout<<"1. ADD";
gotoxy(30,12);
cout<<"2. SUBTRACT";
gotoxy(30,14);
cout<<"3. MULTIPLY ";
gotoxy(30,16);
cout<<"4. DIVIDE ";
gotoxy(30,18);
cout<<"5. BACK";
gotoxy(30,20);
cout<<"Enter ur choice :";
cin>>cch;
if(cch!='5')
{ if(i==1)
{ clrscr();
gotoxy(15,10);
cout<<"Enter First Number : ";
cin>>res;
gotoxy(15,15);
cout<<"Enter Second Number : ";
cin>>a;
}
else
{ clrscr();
gotoxy(15,10);
cout<<"Enter a number : ";
cin>>a;
}
}
switch(cch)
{ case '1': res=res+a;
break;
case '2': res=res-a;
break;
case '3': res=res*a;
break;
case '4': res=res/a;
break;
}
clrscr();
gotoxy(15,10);
cout<<"RESULT = "<<res;
getch();
gotoxy(15,20);
cout<<"<ENTER>";
}
while(cch !='5');
}
// FUNCTION TO CLOSE A PROGRAM
void closeprog()
{
gotoxy(45,1);showtime();
grap();
setcolor(6);
for(i=0;i<=220;i++)
{
rectangle(0+i,0+i,640-i,480-i);
delay(15);
}
for(i=0;i<=220;i++)
{
rectangle(100+i,100,540-i,380);
delay(10);
}
quit();
closegraph();
exit(0);
}
void quit()
{
gotoxy(45,1);showtime();
int a,b,c;
setcolor(0);
for(a=1,b=getmaxy()-1,c=200;a<=getmaxy()/2;a++,b--,c--)
{
line(1,a,getmaxx()-1,a);
line(1,b,getmaxx()-1,b);
sound(10*(c+200));
delay(1);
}
delay(300);
nosound();
setcolor(4);
}
For Documentation of this project drop a comment with your mail id, we provides full documentation soon........ as possible.
No comments :
Post a Comment