#include<iostream.h>
#include<conio.h>
#include<graphics.h>
#include<dos.h>
void getkey(int &ac,int &sc,int&st)
{ REGS m,n;
m.h.ah=0x00;
int86(22,&m,&n);
sc=n.h.ah;
ac=n.h.al;
m.h.ah=0x02;
int86(22,&m,&n);
st=n.h.al;
}
void main()
{ clrscr();
REGS m,n;
int sc,ac,st,d,g,e;
d=DETECT;
initgraph(&d,&g,"c:/tc");
e=graphresult();
if(e!=0)
{ cout<<" graphics r not opened";
getch();
return;
}
setbkcolor(7);
setcolor(5);
textbackground(1);
settextstyle(1, HORIZ_DIR, 4);
outtextxy(110,60,"STUDENT'S DATABASE");
setcolor(6);
textbackground(6);
settextstyle(1, HORIZ_DIR, 3);
outtextxy(150,130,"1) Insert new record");
outtextxy(150,160,"2) Show all record");
outtextxy(150,190,"3) Search a record");
outtextxy(150,220,"4) Delete a record");
outtextxy(150,250,"5) Modify a record");
outtextxy(150,280,"6) Exit");
setcolor(1);
for(int k=0;k<15;k++)
{
// PRINT FIRST ROUND LOOP XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
setcolor(1);
int j=-15;
for(int i=0;i<14;i++)
{ j-=15;
circle(j+=45,15,5); //upper horizontal
setfillstyle(1,1);
floodfill(j,15,1);
circle(j+=15,465,5); //lower horizontal
setfillstyle(1,1);
floodfill(j,465,1);
if(j<=435) //verticals
{ circle(630,j,5);
setfillstyle(1,1);
floodfill(630,j,1);
}
if(j<=390)
{
circle(15,j+45,5);
setfillstyle(1,1);
floodfill(15,j+45,1);
}
}
delay(75);
// WASH FIRST ROUND LOOP XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
setcolor(7);
j=-15;
for( i=0;i<14;i++)
{ j-=15;
circle(j+=45,15,5); //upper horizontal
setfillstyle(1,7);
floodfill(j,15,7);
circle(j+=15,465,5); //lower horizontal
setfillstyle(1,7);
floodfill(j,465,7);
if(j<=435) //verticals
{ circle(630,j,5);
setfillstyle(1,7);
floodfill(630,j,7);
}
if(j<=390)
{
circle(15,j+45,5);
setfillstyle(1,7);
floodfill(15,j+45,7);
}
}
//PRINT SECOND ROUND LOOP XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
setcolor(1);
j=-30;
for( i=0;i<14;i++)
{ j+=15;
circle(j+=45,15,5); //upper horizontal
setfillstyle(1,1);
floodfill(j,15,1);
circle(j-=15,465,5); //lower horizontal
setfillstyle(1,1);
floodfill(j,465,1);
if(j<=420) //verticals front
{ circle(15,j+45,5);
setfillstyle(1,1);
floodfill(15,j+45,1);
circle(630,j+30,5); // back vertical
setfillstyle(1,1);
floodfill(630,j+30,1);
}
}
delay(75);
//WASH SECOND LOOP XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
setcolor(7);
j=-30;
for( i=0;i<14;i++)
{ j+=15;
circle(j+=45,15,5); //upper horizontal
setfillstyle(1,7);
floodfill(j,15,7);
circle(j-=15,465,5); //lower horizontal
setfillstyle(1,7);
floodfill(j,465,7);
if(j<=420) //verticals front
{ circle(15,j+45,5);
setfillstyle(1,7);
floodfill(15,j+45,7);
circle(630,j+30,5); // back vertical
setfillstyle(1,7);
floodfill(630,j+30,7);
}
}
// PRINT THIRD LOOP XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
setcolor(1);
j=0;
for( i=0;i<14;i++)
{
circle(j+=45,15,5); //upper horizontal
setfillstyle(1,1);
floodfill(j,15,1);
circle(j,465,5); //lower horizontal
setfillstyle(1,1);
floodfill(j,465,1);
if(j<=450) //verticals
{ circle(630,j+15,5);
setfillstyle(1,1);
floodfill(630,j+15,1);
}
if(j<=450)
{
circle(15,j,5);
setfillstyle(1,1);
floodfill(15,j,1);
}
}
delay(75);
// WASH THIRD LOOP XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
setcolor(7);
j=0;
for( i=0;i<14;i++)
{
circle(j+=45,15,5); //upper horizontal
setfillstyle(1,7);
floodfill(j,15,7);
circle(j,465,5); //lower horizontal
setfillstyle(1,7);
floodfill(j,465,7);
if(j<=450) //verticals
{ circle(630,j+15,5);
setfillstyle(1,7);
floodfill(630,j+15,7);
}
if(j<=450)
{
circle(15,j,5);
setfillstyle(1,7);
floodfill(15,j,7);
}
}
}
/* m.h.ah=0x00;
int86(22,&m,&n);
sc=n.h.ah;
ac=n.h.al;
m.h.ah=0x02;
int86(22,&m,&n);
st=n.h.al;
while(1)
{
setcolor(9);
rectangle(150,130,400,160);
setfillstyle(1,9);
floodfill(155,140,9);
setcolor(6);
settextstyle(1, HORIZ_DIR, 3);
outtextxy(150,130,"1) Insert new record");
if(sc==28)
getch();
break;
if(sc==77||sc==80)
{ setcolor(6);
rectangle(150,130,400,160);
setfillstyle(1,7);
floodfill(155,140,6);
setcolor(9);
rectangle(150,160,400,160);
setfillstyle(1,9);
floodfill(155,140,9);
setcolor(6);
outtextxy(150,160,"2) Show all record");
getch();
}
}*/
getch();
closegraph();
}
- Upinder Singh Dhami
- Bangalore, Karnataka, India
- Extending one hand to help someone has more value rather than joining two hands for prayer
Archives
-
▼
2009
(135)
-
▼
September
(132)
- program to print a random number
- program to remove the first and last occurance of ...
- program of selection sort
- program to reverse a string without using inbuilt ...
- program which show the basics of pointer
- program to count characters, words and lines in th...
- program to count vovels,digits,spaces,consonent an...
- program to sort a string
- program to find the number of substrings in a string
- program of password, where you write your password...
- program of dynamic merge
- program of dynamic sort
- program to toogle a string
- program which convert a float value to the string
- program to show the use of gotoxy
- program of merge sort
- calculate the occurance of a word in the string
- program to find the transpose of a matrix
- program to find the largest number in each row of ...
- program to find the sum of rows of the matrix
- program to find the sum of diagonal elements of th...
- program to sort the array using function
- program of seletion sort
- program to search a number present in number of ti...
- program to find the product of matrix
- program to insert the element in the array
- program for binary search of elements which are al...
- program to show basics of linklist
- program to count number of nodes in the link list
- program to count odd values of node in linklist
- program to search a node by value
- program to search a node by value and place a node...
- program to search a node by value and remove it
- program which domonstrate the use of tree
- program to remove alternate nodesin the link list
- program to reversea link list
- program to search a node by value and replace it w...
- program to remove duplicate nodes from the link list
- program to enter the name and email of students us...
- program to show inserting and deleting from a queue
- program to remove a duplicate node from link list
- program to insert an element in the queue
- program to calculate the roots of fourth order alz...
- program to solve three variable linear equation
- simple program of railway reservation
- program to replace the substring with another subs...
- program to reverse each word of the string
- program to save the output as a bitmap image
- program of sparse matrix
- program to add, sub, mul ,and divide two complex n...
- program to find the area and circumference of circ...
- program to show the basics of inline function in oops
- program to print rectangle without using inbuilt f...
- program to print rectangular bowl without using in...
- program to print 'c graphic' in the lines without ...
- program to print menu without using inbuilt functions
- program of loading
- program of loading 2
- program of moving boundries
- program to print all the ascii values
- program to print a barcode
- program to print a line
- program to print a welcome screen?
- program to demonstrate setfillstyle
- program to select the different background colours
- program which demonstrate the text style
- program to demonstrate line style
- program to demonstrate the size of text
- program to print a baby
- program of loading 1
- program of loading 2
- program to print mickey mouse
- program to print a variable box
- program to print database using moving lights arou...
- program to print menu base in graphics
- program to print menu in very good graphic form
- program to enter the values in student database
- program to enter the values of data of form in box...
- program of main menu
- program which define the pixel of the cursor while...
- program to draw lines on the screen with the help ...
- program of moving 3dimensional rectangle box
- program to show menu with the cursor
- program which takes a number from keyboard and giv...
- program which draw rectangles on the screen with t...
- program of digital switches
- program to show the basics os screen saver
- program of text box
- project of editor(like notepad) in c++
- project of banking
- project of hostel management
- project of three dimensional calculator working wi...
- graphical project of students database
- project of shooting game
- Program to find the factorial of a large number
- Solved Placement papers of different IT companies
- there is a matrix N x N .Its elements consist of e...
- program to convert binary number into decimal numb...
- A string of charater is given.Find the highest occ...
- Two sentences are given and we were required to pr...
-
▼
September
(132)
program to print database using moving lights around the boundries
Tuesday, September 1, 2009Posted by Upinder Singh Dhami at Tuesday, September 01, 2009
Labels: advance graphics
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment