#include<dos.h>
#include<conio.h>
#include<stdio.h>
#include<stdlib.h>
#include<dos.h>
#include<graphics.h>
void mouse();
void menu();
void second();
void intro();
void looping();
void loadrecord();
void last()
{
int a=getmaxx(),b=getmaxy(),c=getmaxcolor(),d=getmaxx()/2,e=getmaxy()/2;
char f,g,h;
clrscr();
setcolor(0);
setbkcolor(0);
setfillstyle(1,0);
rectangle(0,0,650,480);
floodfill(1,1,0);
setcolor(4);
printf("\n\n\n\n\n\n\n\n\t\t\t Do u want to continue \n");
printf("\t\t\t\t to begning: ");
for (int z=0;z<20;z++)
{
setcolor(z/5);
rectangle(0+z,0+z,a-z,b-z);
}
scanf("%s",&f);
if (f=='y' || f=='Y')
{
getch();
intro();
}
else
{
delay(150);
printf("\n\n\n\n\n\n\n\t\t\tEnter password to continue : ");
for (int z=0;z<20;z++)
{
setcolor(z/5);
rectangle(0+z,0+z,a-z,b-z);
}
scanf("%s",&g);
if (g=='q' || g=='Q')
{
exit(0);
}
else
{
settextstyle(1,0,1);
outtextxy(230,350,"Password incorrect");
delay(150);
outtextxy(200,390,"Press any key to continue :");
getch();
intro();
}
}
getch();
cleardevice();
}
void secondlast()
{
int a=getmaxx(),b=getmaxy(),c=getmaxcolor(),d=getmaxx()/2,e=getmaxy()/2;
char f,g,h;
clrscr();
setcolor(1);
setbkcolor(9);
setfillstyle(5,1);
rectangle(0,0,650,480);
floodfill(1,1,1);
for (int z=5;z<25;z++)
{
setcolor(z/5);
rectangle(-5+z,-5+z,a-z+5,b-z+5);
}
setcolor(YELLOW);
circle(300, 170, 110);
setfillstyle(1, 14);
floodfill(300, 100, 14);
//setting color to black
setcolor(0);
setfillstyle(1,0);
//using fill ellipse and ellipse for creating face.
fillellipse(255, 119, 14, 19);
fillellipse(340, 119, 14, 19);
ellipse(300, 200, 175, 365, 60, 12);
ellipse(300, 200, 175, 365, 60, 10);
ellipse(300, 200, 175, 365, 60, 8);
ellipse(300, 200, 175, 365, 60, 11);
ellipse(300, 200, 175, 365, 60, 9);
// normal text //
setcolor(14);
settextstyle(4,0,5);
outtextxy(187,300,"Have a nice day");
settextstyle(1,0,2);
delay(150);
outtextxy(175,400,"Press any key to continue :->");
getch();
last();
}
void review()
{
int a=getmaxx(),b=getmaxy(),c=getmaxcolor(),d=getmaxx()/2,e=getmaxy()/2;
char f,g[100],h;
clrscr();
setcolor(0);
setbkcolor(0);
setfillstyle(1,0);
rectangle(0,0,650,480);
floodfill(1,1,0);
FILE *file=fopen("review.txt","a");
setcolor(4);
settextstyle(1,0,3);
outtextxy(255,50,"Your review");
printf("\n\n\n\n\n\n\n\n\n\t\t\tWhat need to be improved : ");
for (int z=10;z<30;z++)
{
setcolor(z/5);
rectangle(-10+z,-10+z,a-z+10,b-z+10);
}
scanf("%s",&g);
fprintf(file ,"%s\n",&g);
settextstyle(1,0,1);
delay(100);
outtextxy(50,250,"Thank u for your review. We will improve in next update");
delay(100);
outtextxy(180,310,"Press any key to continue ->");
getch();
secondlast();
}
void program()
{
int a=getmaxx(),b=getmaxy(),c=getmaxcolor(),d=getmaxx()/2,e=getmaxy()/2;
char f,g[100],h;
clrscr();
setcolor(0);
setbkcolor(0);
setfillstyle(1,0);
rectangle(0,0,650,480);
floodfill(1,1,0);
FILE *file=fopen("comment.txt","a");
setcolor(1);
settextstyle(2,0,7);
outtextxy(250,50,"Your comment");
printf("\n\n\n\n\n\n\n\n\n\n\n\t\t\tHow was the program : ");
for (int z=15;z<35;z++)
{
setcolor(z/5);
rectangle(-15+z,-15+z,a-z+15,b-z+15);
}
scanf("%s",&g);
fprintf(file,"%s\n",&g);
setcolor(1);
delay(150);
outtextxy(190,300,"Thank u for your comment!");
outtextxy(180,340,"Press any key to continue ->");
getch();
cleardevice();
review();
}
void tree()
{
int a=getmaxx(),b=getmaxy(),c=getmaxcolor(),d=getmaxx()/2,e=getmaxy()/2;
clrscr();
setbkcolor(0);
setcolor(0);
setfillstyle(1,0);
rectangle(0,0,a,b);
floodfill(1,1,0);
setcolor(6);
setfillstyle(1,6);
rectangle(95,318,105,430);
floodfill(96,319,6);
rectangle(515,318,525,430);
floodfill(516,319,6);
rectangle(305,318,315,430);
floodfill(306,319,6);
setcolor(GREEN);
setfillstyle(1,GREEN);
pieslice(100,215,238,302,40);
floodfill(101,216,GREEN);
pieslice(100,235,230,310,45);
floodfill(101,236,GREEN);
pieslice(100,260,220,320,50);
floodfill(101,261,GREEN);
pieslice(100,290,215,325,55);
floodfill(101,291,GREEN);
pieslice(100,320,207,333,60);
floodfill(101,321,GREEN);
///right tree ///
pieslice(520,215,238,302,40);
pieslice(520,235,230,310,45);
pieslice(520,260,220,320,50);
pieslice(520,290,215,325,55);
pieslice(520,320,207,333,60);
// big tree//
pieslice(310,140,240,300,60);
pieslice(310,175,228,312,65);
pieslice(310,215,216,324,70);
pieslice(310,255,210,330,75);
pieslice(310,300,205,335,80);
line(0,b-48,a,b-48);
delay(150);
for (int k=0;k<640;k+=24)
{
for (int l=80;l<425;l+=30)
{
putpixel(k,l,15);
putpixel(k+1,l+1,15);
putpixel(k,l+1,15);
putpixel(k+1,l,15);
putpixel(k+2,l+2,15);
putpixel(k+1,l+2,15);
putpixel(k+2,l+1,15);
putpixel(k+2,l+3,15);
putpixel(k+3,l+2,15);
putpixel(k+3,l+3,15);
putpixel(k+3,l+4,15);
putpixel(k+4,l+3,15);
putpixel(k+4,l+4,15);
// //
putpixel(k+2,l+2,15);
putpixel(k+2,l,15);
putpixel(k+3,l,15);
putpixel(k+3,l+3,15);
putpixel(k+4,l,15);
putpixel(k+4,l+4,15);
// //
putpixel(k+2,l+1,15);
putpixel(k,l+1,15);
putpixel(k+3,l+1,15);
putpixel(k,l+1,15);
putpixel(k+4,l+1,15);
putpixel(k,l+1,15);
/// //
putpixel(k+2,l+2,15);
putpixel(k,l+2,15);
putpixel(k+3,l+2,15);
putpixel(k,l+2,15);
putpixel(k+4,l+2,15);
putpixel(k,l+2,15);
setcolor(15);
setfillstyle(1,15);
circle(0+k/3,418,7+(l/60));
floodfill(0+k/3,418,15);
circle(-250+k+l,418,7+(l/40));
floodfill(-250+k+l,418,15);
}
delay(1);
}
setcolor(15);
settextstyle(3,0,4);
outtextxy(210,10,"Merry Christmas");
delay(80);
settextstyle(3,0,3);
outtextxy(300,45,"2019");
delay(150);
getch();
cleardevice();
program();
}
void detail()
{
int a=getmaxx(),b=getmaxy();
clrscr();
setcolor(0);
setbkcolor(0);
setfillstyle(1,0);
rectangle(0,0,650,480);
floodfill(1,1,0);
setcolor(15);
settextstyle(1,0,2);
outtextxy(190,100," Thank u for coming ");
outtextxy(190,140,"and using this program");
outtextxy(50,200," Contact me on:");
settextstyle(2,0,6);
outtextxy(50,240," Facebook : Roshan thapa");
outtextxy(50,260," Website : englishfreewritingforeveryone.blogspot.com");
outtextxy(50,280," To learn more about C programming");
settextstyle(1,0,1);
delay(100);
outtextxy(190,350,"Press any key to continue :->");
for (int z=20;z<40;z++)
{
setcolor(z/5);
rectangle(-20+z,-20+z,a-z+20,b-z+20);
}
getch();
cleardevice();
tree();
}
void loadrecorddup()
{
union REGS in,out;
int m=0,xa=0,ya=0;
in.x.ax=2;
int86(0x33,&in,&out);
in.x.ax=7;
in.x.cx=0;
in.x.dx=635;
int86(0x33,&in,&out);
in.x.ax=8;
in.x.cx=0;
in.x.dx=465;
int86(0x33,&in,&out);
clrscr();
setbkcolor(1);
setcolor(1);
setfillstyle(1,1);
rectangle(0,0,650,480);
floodfill(1,1,1);
setcolor(15);
char g[8],h[8],i[10],j[15],e,f,w[15],z[15];
char x[10],y[10];
setcolor(4);
setfillstyle(1,4);
rectangle(175,45,455,65);
floodfill(176,46,4);
setcolor(15);
printf("\n\n\n\n\n\n\n\n");
outtextxy(180,50,"******** Student's Record ********");
FILE *open1=fopen("record.txt","r");
do
{
char ch = fgetc(open1);
if (ch==EOF)
break ;
printf("%c", ch);
} while(1);
setcolor(15);
settextstyle(14,0,1);
outtextxy(5,90,"Student's Name");
outtextxy(132,90,"Parent's Name");
outtextxy(253,90,"Address");
outtextxy(330,90,"School name");
outtextxy(435,90,"Roll no.");
outtextxy(510,90,"Age");
outtextxy(585,90,"Aim");
rectangle(0,80,639,400);
line(0,100,639,100);
rectangle(125,80,240,400);
rectangle(320,80,430,400);
rectangle(500,80,540,400);
setcolor(14);
settextstyle(14,0,6);
rectangle(70,430,140,450);
outtextxy(78,437,"<- Back");
rectangle(500,430,570,450);
outtextxy(508,437,"Next ->");
in.x.ax=1;
int86(0x33,&in,&out);
do
{
in.x.ax=3;
int86(0x33,&in,&out);
m=out.x.bx;
xa=out.x.cx;
ya=out.x.dx;
int86(0x33,&in,&out);
if (m==1)
{
if (xa>=508 && ya>=430 && xa<=570 && ya<=450)
{
cleardevice();
detail();
}
else if (xa>=70 && ya>=430 && xa<=140 && ya<=450)
{
cleardevice();
menu();
}
}
}
while(1);
cleardevice();
}
void record()
{
union REGS in,out;
in.x.ax=7;
in.x.cx=0;
in.x.dx=635;
int86(0x33,&in,&out);
in.x.ax=8;
in.x.cx=0;
in.x.dx=465;
int86(0x33,&in,&out);
int m=0,x=0,y=0;
{
in.x.ax=2;
int86(0x33,&in,&out);
clrscr();
setcolor(0);
setbkcolor(0);
setfillstyle(1,0);
rectangle(0,0,650,480);
floodfill(1,1,0);
setcolor(4);
settextstyle(14,HORIZ_DIR,6);
outtextxy(270,180,"Loading, Please Wait...");
outtextxy(290,270,"Creating file ...");
for(int i=25;i<625;i++)
{
delay(5);
line(i,210,i,230);
}
settextstyle(1,HORIZ_DIR,2);
outtextxy(200,310,"File is successfully created..");
getch();
getch();
}
in.x.ax=1;
int86(0x33,&in,&out);
clrscr();
clrscr();
char a[8],b[8],c[10],d[15],e,f,p[15],s[30];
int q,r;
int g;
setcolor(0);
setbkcolor(0);
setfillstyle(1,0);
rectangle(0,0,650,480);
floodfill(1,1,0);
setcolor(4);
outtextxy(200,10,"Fill the following inromation : ");
FILE *file=fopen("record.txt","a");
printf("\n\n\n\n\t Enter your First name: ");
scanf("%s",&a);
printf("\n\t Enter your Last name: ");
scanf("%s",&b);
printf("\n\t Enter your Parent's name: ");
scanf("%s",&c);
printf("\n\t Enter your Address: ");
scanf("%s",&d);
printf("\n\t Enter your School name: ");
scanf("%s",&p);
printf("\n\t Enter your roll no: ");
scanf("%s",&q);
printf("\n\t Enter your age: ");
scanf("%s",&r);
printf("\n\t Enter your aim: ");
scanf("%s",&s);
fprintf(file," %s ",a);
fprintf(file,"%s ",b);
fprintf(file,"%s\t",c);
fprintf(file,"%s ",d);
fprintf(file,"%s ",p);
fprintf(file,"%s ",q);
fprintf(file,"%s ",r);
fprintf(file,"%s\n",s);
fclose(file);
setcolor(14);
settextstyle(14,0,6);
outtextxy(205,341,"Do u want to see your record : ");
outtextxy(196,373,"Click on next button to continue : ");
rectangle(70,430,140,450);
outtextxy(78,437,"<- Back");
rectangle(500,430,570,450);
outtextxy(508,437,"Next ->");
do
{
in.x.ax=3;
int86(0x33,&in,&out);
m=out.x.bx;
x=out.x.cx;
y=out.x.dx;
int86(0x33,&in,&out);
if (m==1)
{
if (x>=508 && y>=430 && x<=570 && y<=450)
{
cleardevice();
loadrecorddup();
}
else if (x>=70 && y>=430 && x<=140 && y<=450)
{
cleardevice();
menu();
}
}
}
while(1);
cleardevice();
}
void loadrecord()
{
union REGS in,out;
int m=0,xa=0,ya=0;
in.x.ax=1;
int86(0x33,&in,&out);
in.x.ax=7;
in.x.cx=0;
in.x.dx=635;
int86(0x33,&in,&out);
in.x.ax=8;
in.x.cx=0;
in.x.dx=465;
int86(0x33,&in,&out);
clrscr();
setbkcolor(1);
setcolor(1);
setfillstyle(1,1);
rectangle(0,0,650,480);
floodfill(1,1,1);
setcolor(15);
char g[8],h[8],i[10],j[15],e,f,w[15],z[15];
int x,y;
setcolor(4);
setfillstyle(1,4);
rectangle(175,45,455,65);
floodfill(176,46,4);
setcolor(15);
printf("\n\n\n\n\n\n\n\n");
outtextxy(180,50,"******** Student's Record ********");
FILE *open=fopen("record.txt","r");
do
{
char ch = fgetc(open);
if (ch==EOF)
break ;
printf("%c", ch);
} while(1);
settextstyle(14,0,1);
outtextxy(5,90,"Student's Name");
outtextxy(132,90,"Parent's Name");
outtextxy(253,90,"Address");
outtextxy(330,90,"School name");
outtextxy(435,90,"Roll no.");
outtextxy(510,90,"Age");
outtextxy(585,90,"Aim");
rectangle(0,80,639,400);
line(0,100,639,100);
rectangle(125,80,240,400);
rectangle(320,80,430,400);
rectangle(500,80,540,400);
settextstyle(14,0,6);
setcolor(14);
rectangle(70,430,140,450);
outtextxy(78,437,"<- Back");
do
{
in.x.ax=3;
int86(0x33,&in,&out);
m=out.x.bx;
xa=out.x.cx;
ya=out.x.dx;
int86(0x33,&in,&out);
if (m==1)
{
if (xa>=70 && ya>=430 && xa<=140 && ya<=450)
{
cleardevice();
menu();
}
}
}
while(1);
cleardevice();
}
void setting()
{
union REGS in,out;
int m=0,x=0,y=0;
in.x.ax=1;
int86(0x33,&in,&out);
in.x.ax=7;
in.x.cx=0;
in.x.dx=635;
int86(0x33,&in,&out);
in.x.ax=8;
in.x.cx=0;
in.x.dx=465;
int86(0x33,&in,&out);
clrscr();
setbkcolor(0);
setcolor(0);
setfillstyle(1,0);
rectangle(0,0,650,480);
floodfill(1,1,0);
setcolor(15);
outtextxy(150,150,"This will allow you to change colors");
outtextxy(180,350,"Press any key to continue :->");
settextstyle(14,0,6);
setcolor(14);
rectangle(70,430,140,450);
outtextxy(78,437,"<- Back");
do
{
in.x.ax=3;
int86(0x33,&in,&out);
m=out.x.bx;
x=out.x.cx;
y=out.x.dx;
int86(0x33,&in,&out);
if (m==1)
{
if (x>=70 && y>=430 && x<=140 && y<=450)
{
cleardevice();
menu();
}
}
}
while(1);
}
void helpandsupport()
{
union REGS in,out;
int m=0,x=0,y=0;
in.x.ax=1;
int86(0x33,&in,&out);
in.x.ax=7;
in.x.cx=0;
in.x.dx=635;
int86(0x33,&in,&out);
in.x.ax=8;
in.x.cx=0;
in.x.dx=465;
int86(0x33,&in,&out);
clrscr();
setbkcolor(0);
setcolor(0);
setfillstyle(1,0);
rectangle(0,0,650,480);
floodfill(1,1,0);
setcolor(15);
settextstyle(1,0,2);
outtextxy(180,140,"Click on create new record");
outtextxy(180,170,"Fill your infromation below");
outtextxy(180,200,"Then do what it say's to do");
outtextxy(180,350,"Press any key to continue :->");
settextstyle(14,0,6);
setcolor(14);
rectangle(70,430,140,450);
outtextxy(78,437,"<- Back");
do
{
in.x.ax=3;
int86(0x33,&in,&out);
m=out.x.bx;
x=out.x.cx;
y=out.x.dx;
int86(0x33,&in,&out);
if (m==1)
{
if (x>=70 && y>=430 && x<=140 && y<=450)
{
cleardevice();
menu();
}
}
}
while(1);
}
void contact()
{
union REGS in,out;
in.x.ax=1;
int86(0x33,&in,&out);
in.x.ax=7;
in.x.cx=0;
in.x.dx=635;
int86(0x33,&in,&out);
in.x.ax=8;
in.x.cx=0;
in.x.dx=465;
int86(0x33,&in,&out);
int m=0,x=0,y=0;
clrscr();
setbkcolor(0);
setcolor(0);
setfillstyle(1,0);
rectangle(0,0,650,480);
floodfill(1,1,0);
setcolor(1);
settextstyle(1,0,2);
outtextxy(190,100," Thank u for coming ");
outtextxy(190,140,"and using this program");
outtextxy(50,200," Contact me on:");
settextstyle(2,0,6);
outtextxy(50,240,"Facebook : Roshan thapa");
outtextxy(50,260,"Website : englishfreewritingforeveryone.blogspot.com");
outtextxy(50,280,"To learn more about C programming");
settextstyle(14,0,6);
setcolor(14);
rectangle(70,430,140,450);
outtextxy(78,437,"<- Back");
do
{
in.x.ax=3;
int86(0x33,&in,&out);
m=out.x.bx;
x=out.x.cx;
y=out.x.dx;
int86(0x33,&in,&out);
if (m==1)
{
if (x>=70 && y>=430 && x<=140 && y<=450)
{
cleardevice();
menu();
}
}
}
while(1);
}
void menu()
{
union REGS in,out;
in.x.ax=1;
int86(0x33,&in,&out);
in.x.ax=7;
in.x.cx=0;
in.x.dx=635;
int86(0x33,&in,&out);
in.x.ax=8;
in.x.cx=75;
in.x.dx=403;
int86(0x33,&in,&out);
int a=getmaxx(),b=getmaxy(),c=getmaxcolor(),d=getmaxx()/2,e=getmaxy()/2;
int m=0,x=0,y=0;
char key;
clrscr();
setbkcolor(1);
setcolor(1);
setfillstyle(1,1);
rectangle(0,0,650,490);
rectangle(0,410,a,490);
floodfill(1,1,1);
floodfill(1,411,1);
setcolor(13);
line(0,75,a,75);
line(0,405,a,405);
for (int o=0;o<=5;o++)
{
setcolor(RED);
rectangle(10+o,90+o,a-10-o,b-90-o);
setcolor(GREEN);
rectangle(25+o,105+o,a-25-o,b-105-o);
}
// menu content //
setcolor(0);
setbkcolor(0);
setfillstyle(2,0);
rectangle(d-70,130,d+85,155);
floodfill(d,131,0);
rectangle(d-70,170,d+85,195);
floodfill(d,171,0);
rectangle(d-70,210,d+85,235);
floodfill(d,211,0);
rectangle(d-70,250,d+85,275);
floodfill(d,251,0);
rectangle(d-70,290,d+85,315);
floodfill(d,291,0);
rectangle(d-70,330,d+85,355);
floodfill(d,331,0);
// menu box //
setcolor(YELLOW);
settextstyle(15,0,4);
outtextxy(0,79,"===================================== MENU ======================================");
// side border of the menu //
setcolor(YELLOW);
outtextxy(0,392,"=================================================================================");
outtextxy(17,97,"============================================================================");
outtextxy(17,375,"============================================================================");
settextstyle(15,1,4);
outtextxy(8,86,"======================================");
outtextxy(a,86,"======================================");
outtextxy(24,102,"==================================");
outtextxy(a-16,102,"==================================");
// content //
setcolor(14);
settextstyle(14,0,1);
outtextxy(d-60,137,"Create new record ");
outtextxy(d-65,180," Display record ");
outtextxy(d-65,219," Setting ");
outtextxy(d-66,260," Help and Support ");
outtextxy(d-65,300," Contact ");
outtextxy(d-63,340," Exit program ");
outtextxy(250,30,"Enter your choice : ");
outtextxy(280,50,"Press mouse");
setcolor(1);
setfillstyle(1,1);
rectangle(0,406,650,490);
floodfill(1,407,1);
do
{
in.x.ax=3;
int86(0x33,&in,&out);
m=out.x.bx;
x=out.x.cx;
y=out.x.dx;
int86(0x33,&in,&out);
setcolor(0);
if (x>=d-70 && y>=130 && x<=d+85 && y<=155)
{
setfillstyle(1,1);
rectangle(d-75,125,d+90,160);
floodfill(d-69,131,0);
}
else if (x>=d-70 && y>=170 && x<=d+85 && y<=195)
{
setfillstyle(1,1);
rectangle(d-75,165,d+90,200);
floodfill(d-69,171,0);
}
else if (x>=d-70 && y>=210 && x<=d+85 && y<=235)
{
setfillstyle(1,1);
rectangle(d-75,205,d+90,240);
floodfill(d-69,211,0);
}
else if (x>=d-70 && y>=250 && x<=d+85 && y<=275)
{
setfillstyle(1,1);
rectangle(d-75,245,d+90,280);
floodfill(d-69,251,0);
}
else if (x>=d-70 && y>=290 && x<=d+85 && y<=315)
{
setfillstyle(1,1);
rectangle(d-75,285,d+90,320);
floodfill(d-69,291,0);
}
else if (x>=d-70 && y>=330 && x<=d+85 && y<=355)
{
setfillstyle(1,1);
rectangle(d-75,325,d+90,360);
floodfill(d-69,331,0);
}
if (m==1)
{
if (x>=d-70 && y>=130 && x<=d+85 && y<=155)
{
cleardevice();
record();
}
else if (x>=d-70 && y>=170 && x<=d+85 && y<=195)
{
cleardevice();
loadrecord();
}
else if (x>=d-70 && y>=210 && x<=d+85 && y<=235)
{
cleardevice();
setting();
}
else if (x>=d-70 && y>=250 && x<=d+85 && y<=275)
{
cleardevice();
helpandsupport();
}
else if (x>=d-70 && y>=290 && x<=d+85 && y<=315)
{
cleardevice();
contact();
}
else if (x>=d-70 && y>=330 && x<=d+85 && y<=355)
{
cleardevice();
last();
}
m=0;
x=0;
y=0;
}
}
while(1);
}
void looping()
{
clrscr();
setcolor(4);
do
{
for (int n;n<=400;n++)
{
settextstyle(1,0,3);
sound(n*n+n);
setcolor(n/13);
outtextxy(120,20+n,"Press any key to continue program...");
delay(1);
setbkcolor(n/24);
delay(20);
cleardevice();
delay(1);
if (kbhit()){break;}
}
n=0;
if (kbhit()){break;}
}
while(1);
nosound();
cleardevice();
menu();
}
void second()
{
int a=getmaxx(),b=getmaxy(),c=getmaxcolor(),d=getmaxx()/2,e=getmaxy()/2;
clrscr();
// border for the page //
for (int j=0;j<10;j++)
{
setcolor(BLUE);
rectangle(0+j,0+j,a-j,b-j);
setcolor(RED);
rectangle(-4+j,-4+j,a-j+4,b-j+4);
setcolor(GREEN);
rectangle(3+j,3+j,a-j-3,b-j-3);
}
setbkcolor(7);
setcolor(4);
settextstyle(4,0,5);
// loading for Enter any key //
outtextxy(10,40,"Welcome to the Science fair 2019");
settextstyle(4,0,4);
outtextxy(93,110,"Organized by St. Xavier's School");
outtextxy(200,160,"Jawalakhel,Lalitpur");
getch();
for (int q=0;q<=16;q++)
{
setcolor(q);
setfillstyle(1,q);
rectangle(140,345,500,385);
floodfill(141,346,q);
delay(100);
setcolor(q+2);
settextstyle(1,0,3);
outtextxy(160,350,"Enter any key to continue....");
delay(100);
if (kbhit()){break;}
}
getch();
getch();
cleardevice();
looping();
}
void first()
{
int a=getmaxx(),b=getmaxy(),c=getmaxcolor(),d=getmaxx()/2,e=getmaxy()/2;
setbkcolor(c);
setcolor(BLUE);
settextstyle(4,0,5);
outtextxy(160,50,"St.Xavier's School");
settextstyle(4,0,2);
outtextxy(240,110,"Jawalakhel,Lalitpur");
setlinestyle(3,8,15);
line(160,95,483,95);
// curtain design //
// big pieslice //
setcolor(RED);
setfillstyle(1,RED);
pieslice(0,0,270,360,170);
floodfill(0,1,RED);
pieslice(a,0,180,270,170);
floodfill(a,1,RED);
//small pieslice //
pieslice(0,175,0,360,70);
floodfill(0,175,RED);
pieslice(a,175,90,270,70);
floodfill(a,175,RED);
//line downward //
for (int i=0;i<300;i++)
{
sound(i*i);
line(i/8,230,i/4,500);
line(a-(i/8),230,a-(i/4),500);
}
nosound();
getch();
// loading for Enter any key //
do
{
settextstyle(0,0,1);
setcolor(c);
outtextxy(240,400,"<<< >>>");
setcolor(RED);
delay(90);
outtextxy(240,400," Enter any key ");
delay(150);
if (kbhit()){break;}
setcolor(c);
outtextxy(240,400,"<<< >>>");
setcolor(RED);
delay(90);
outtextxy(240,400," < Enter any key > ");
delay(150);
if (kbhit()){break;}
setcolor(c);
outtextxy(240,400,"<<< >>>");
setcolor(RED);
delay(90);
outtextxy(240,400," << Enter any key >> ");
delay(150);
if (kbhit()){break;}
setcolor(c);
outtextxy(240,400,"<<< >>>");
setcolor(RED);
delay(90);
outtextxy(240,400,"<<< Enter any key >>>");
delay(150);
if (kbhit()){break;}
}
while(1);
// overlapping looping //
for (int m=0;m<=321;m++)
{
sound(m*m);
setcolor(7);
line(0+m,0,0+m,b);
line(a-m,0,a-m,b);
delay(25-(321/14));
}
nosound();
cleardevice();
second();
}
void intro()
{
int a=getmaxx(),b=getmaxy(),c=getmaxcolor(),d=getmaxx()/2,e=getmaxy()/2;
char f,g,h;
clrscr();
setcolor(0);
setbkcolor(0);
setfillstyle(1,0);
rectangle(0,0,650,480);
floodfill(1,1,0);
setcolor(15);
clrscr();
do
{
for (int j=0;j<950;j++)
{
settextstyle(2,0,9);
outtextxy(a-j,50,"<- Welcome to the mini project from C programming");
outtextxy(a-j+35,140,"<- This program allow to record student's data ");
outtextxy(a-j+50,230,"<- From the side of Computer Science");
outtextxy(a-j+40,410,"-Created by Class 11 'D' Science stream");
delay(4);
if (kbhit()){break;}
cleardevice();
}
if (kbhit()){break;}
}
while(1);
cleardevice();
clrscr();
first();
}
void main()
{
int gd=DETECT,gm;
initgraph(&gd,&gm,"c:\\TURBOC3\\bgi");
intro();
getch();
cleardevice();
closegraph();
}
No comments:
Post a Comment