/*CPPS1 PROJECT*/ //THE SOLAR SYSTEM// /*------------------------------------------------------------------------*/ #include #include #include #include #include #include /*-------------------------------*/ void start(void); void quit(void); void input(void); /*-------------------------------*/ void mercury(void); void mercury1(void); void mercury2(void); /*-------------------------------*/ void pluto(void); void pluto1(void); void pluto2(void); /*-------------------------------*/ void venus(void); void venus1(void); void venus2(void); /*-------------------------------*/ void neptune(void); void neptune1(void); void neptune2(void); /*-------------------------------*/ void saturn(void); void saturn1(void); void saturn2(void); /*-------------------------------*/ void earth(void); void earth1(void); void earth2(void); /*-------------------------------*/ void mars(void); void mars1(void); void mars2(void); /*-------------------------------*/ void jupiter(void); void jupiter1(void); void jupiter2(void); /*-------------------------------*/ void sun(void); void sun1(void); void sun2(void); /*-------------------------------*/ void uranus(void); void uranus1(void); void uranus2(void); /*-------------------------------*/ void credits(void); void title1(void); void title2(void); void menu(void); void as(int x,int y,int r); void display(void); void data(void); void details(void); void end(void); void main(void) { start(); title1(); title2(); display(); input(); quit(); } /*------------------------INITIALIZING GRAPHICS------------------*/ void start(void) { int x,y; detectgraph(&x,&y); initgraph(&x,&y,"c:\\tc\\bgi"); } /*---------------------------Bismillah---------------*/ void title1(void) { int i,j; settextstyle(TRIPLEX_FONT,HORIZ_DIR,2); setcolor(GREEN); for(i=440;i>=200;i--) { if(kbhit()) { break; } cleardevice(); moveto(40,i); outtext("IN THE NAME OF ALLAH MOST GRACIOUS AND MERCIFUL"); delay(10); } getch(); } /*--------------------------SOLARSYSTEM------------------*/ void title2(void) { int i,j; settextstyle(TRIPLEX_FONT,HORIZ_DIR,8); setcolor(4); for(i=0;i<=150;i++) { cleardevice(); moveto(200,i); outtext("SOLAR"); moveto(180,400-i); outtext("SYSTEM"); delay(25); } settextstyle(TRIPLEX_FONT,HORIZ_DIR,1); setcolor(12); moveto(250,400); outtext("PRESS ANY KEY"); settextstyle(TRIPLEX_FONT,HORIZ_DIR,8); setcolor(4); for(i=0;i>=0;i++) { if(kbhit()) { break; } for(j=0;j<=15;j++) { setcolor(i); moveto(200,150); outtext("SOLAR"); moveto(180,250); outtext("SYSTEM"); } } getch(); } //DIAGRAM// void display(void) { cleardevice(); /*----------------------OUTER ELLIPSE--------------*/ setcolor(4); ellipse(320,230,0,360,315,230); /*-----------------------SUN-----------------------*/ settextstyle(SMALL_FONT,HORIZ_DIR,5); int xc=320,yc=240; int Rad=50; setcolor(14); moveto(380,210); outtext("SUN"); /*-----------------------MERCURY---------------------*/ as(xc,yc,Rad); settextstyle(SMALL_FONT,HORIZ_DIR,4); int xc1=265,yc1=180; int rad1=8; setcolor(9); moveto(280,170); outtext("MERCURY"); /*----------------------VENUS-----------------------*/ as(xc1,yc1,rad1); int xc2=320,yc2=330; int rad2=15; setcolor(2); moveto(345,315); outtext("VENUS"); /*----------------------EARTH-------------------------*/ as(xc2,yc2,rad2); int xc3=194, yc3=180; int rad3=15; setcolor(1); moveto(212,160); outtext("EARTH"); /*----------------------MARS--------------------------*/ as(xc3,yc3,rad3); int xc4=309,yc4=110; int rad4=8; setcolor(4); moveto(327,100); outtext("MARS"); /*-----------------------JUPITER---------------------*/ as(xc4,yc4,rad4); int xc5=190,yc5=350; int rad5=30; setcolor(8); moveto(225,320); outtext("JUPITER"); /*-----------------------SATURN-----------------------*/ as(xc5,yc5,rad5); int xc6=480,yc6=130; int rad6=25; setcolor(13); ellipse(480,130,0,360,45,12); moveto(515,100); outtext("SATURN"); /*-----------------------URANUS------------------------*/ as(xc6,yc6,rad6); int xc7=420,yc7=412; int rad7=20; setcolor(11); ellipse(420,412,0,360,30,7); moveto(450,400); outtext("URANUS"); /*-----------------------NEPTUNE-------------------------*/ as(xc7,yc7,rad7); int xc8=550,yc8=322; int rad8=15; setcolor(12); ellipse(550,322,0,360,25,6); moveto(570,300); outtext("NEPTUNE"); /*-----------------------PLUTO----------------------------*/ as(xc8,yc8,rad8); int xc9=220,yc9=427; int rad9=6; setcolor(7); moveto(235,420); outtext("PLUTO"); /*------------------------MAIN MENU---------------*/ as(xc9,yc9,rad9); setfillstyle(1,1); bar(0,0,150,20); settextstyle(DEFAULT_FONT,HORIZ_DIR,1); setcolor(WHITE); moveto(36,8); outtext("M FOR MENU"); } /*-------------------------------INPUT FOR MENU------------------*/ void input(void) { char option; do { option=getch(); if(option=='m'||option=='M') { menu(); } }while(option!='m'||option!='M'); } /*---------------------------MENU------------------*/ void menu(void) { int i,choice; setfillstyle(1,WHITE); for(i=0;i<=150;i++) { delay(5); bar(0,24,i,170); } setcolor(1); moveto(5,50); outtext("D FOR DETAILS"); moveto(5,90); outtext("C FOR CREDITS"); moveto(5,130); outtext("Q TO QUIT"); choice=getch(); if(choice=='q'||choice=='Q') { quit(); } if(choice=='D'||choice=='d') { details(); } if(choice=='c'||choice=='C') { credits(); } else { display(); input(); } } /*-------------------------LIST OF PLANETS-------------------*/ void details(void) { int i,choice; setfillstyle(1,WHITE); for(i=0;i<=150;i++) { delay(5); bar(0,24,i,270); } setcolor(1); moveto(5,50); outtext("0 FOR SUN"); moveto(5,70); outtext("1 FOR MERCURY"); moveto(5,90); outtext("2 FOR VENUS"); moveto(5,110); outtext("3 FOR EARTH"); moveto(5,130); outtext("4 FOR MARS"); moveto(5,150); outtext("5 FOR JUPITER"); moveto(5,170); outtext("6 FOR SATURN"); moveto(5,190); outtext("7 FOR URANUS"); moveto(5,210); outtext("8 FOR NEPTUNE"); moveto(5,230); outtext("9 FOR PLUTO"); choice=getch(); if(choice=='1') { mercury(); } if(choice=='2') { venus(); } if(choice=='3') { earth(); } if(choice=='4') { mars(); } if(choice=='5') { jupiter(); } if(choice=='6') { saturn(); } if(choice=='7') { uranus(); } if(choice=='8') { neptune(); } if(choice=='9') { pluto(); } if(choice=='0') { sun(); } else { display(); menu(); } } /*-------------------------------DATA--------------------*/ void mercury(void) { int no,option; cleardevice(); data(); setcolor(4); settextstyle(SMALL_FONT,HORIZ_DIR,6); moveto(280,51); outtext("MURCURY"); mercury1(); no=1; do { option=getch(); if(option=='b'||option=='B') { display(); details(); } if(option==73) /* page up */ { if(no==2) { no=1; mercury1(); } } else if(option==81) /* page down */ { if(no==1) { no=2; mercury2(); } } }while(option!='b'||option!='B'); } void mercury1(void) { setfillstyle(1,BLACK); bar(130,80,500,360); int xc1=310,yc1=120; int rad1=35; setcolor(9); as(xc1,yc1,rad1); settextstyle(SMALL_FONT,HORIZ_DIR,5); setcolor(GREEN); moveto(140,160); outtext("In astronomy,innermost planet of the "); moveto(140,180); outtext("solar system. 58 million km (35,960,000 miles)."); moveto(140,200); outtext("Except for Pluto,it is the smallest of "); moveto(140,220); outtext("the nine major planets,having a diameter of"); moveto(140,240); outtext("about 4,870 km (3,050 miles)."); moveto(140,260); outtext("Mercury orbits closer to the sun than any"); moveto(140,280); outtext("other planet, making it dry, hot, and virtually"); moveto(140,300); outtext("airless. Although the planet's cratered surface"); moveto(140,320); outtext("resembles that of the moon, it is believed that"); } void mercury2(void) { setfillstyle(1,BLACK); bar(130,80,500,360); settextstyle(SMALL_FONT,HORIZ_DIR,5); setcolor(GREEN); moveto(140,120); outtext("the interior is actually similar to the earth's,"); moveto(140,140); outtext("consisting primarily of iron and other heavy"); moveto(140,160); outtext("elements."); } void pluto(void) { int no,option; cleardevice(); data(); setcolor(4); settextstyle(SMALL_FONT,HORIZ_DIR,6); moveto(280,51); outtext("PLUTO"); pluto1(); no=1; do { option=getch(); if(option=='b'||option=='B') { display(); details(); } if(option==73) /* page up */ { if(no==2) { no=1; pluto1(); } } else if(option==81) /* page down */ { if(no==1) { no=2; pluto2(); } } }while(option!='b'||option!='B'); } void pluto1(void) { setfillstyle(1,BLACK); bar(130,80,500,360); int xc1=310,yc1=120; int rad1=35; setcolor(7); as(xc1,yc1,rad1); settextstyle(SMALL_FONT,HORIZ_DIR,5); setcolor(GREEN); moveto(140,160); outtext("Pluto is farther from the sun than "); moveto(140,180); outtext("the other planets in the solar system,"); moveto(140,200); outtext("although it occasionally moves in closer"); moveto(140,220); outtext("than Neptune due to an irregular orbit."); moveto(140,240); outtext("The small, rocky, and cold planet takes"); moveto(140,260); outtext("247.7 years to revolve around the sun."); moveto(140,280); outtext("foreground; its moon, Charon, background;"); moveto(140,300); outtext(" and the distant sun, upper right."); } void pluto2(void) { setfillstyle(1,BLACK); bar(130,80,500,360); settextstyle(SMALL_FONT,HORIZ_DIR,5); setcolor(GREEN); moveto(140,120); outtext("Pluto is normally the outermost of the"); moveto(140,140); outtext("known planets and the most distant from"); moveto(140,160); outtext("the Sun; its mean distance from the"); moveto(140,180); outtext("latter is calculated at about 5.9"); moveto(140,200); outtext("billion km (3.7 billion miles)."); } void jupiter(void) { int no,option; cleardevice(); data(); setcolor(4); settextstyle(SMALL_FONT,HORIZ_DIR,6); moveto(280,51); outtext("JUPITER"); jupiter1(); no=1; do { option=getch(); if(option=='b'||option=='B') { display(); details(); } if(option==73) /* page up */ { if(no==2) { no=1; jupiter1(); } } else if(option==81) /* page down */ { if(no==1) { no=2; jupiter2(); } } }while(option!='b'||option!='B'); } void jupiter1(void) { setfillstyle(1,BLACK); bar(130,80,500,360); int xc1=310,yc1=120; int rad1=35; setcolor(8); as(xc1,yc1,rad1); settextstyle(SMALL_FONT,HORIZ_DIR,5); setcolor(GREEN); moveto(140,160); outtext("Jupiter is the largest of the planets,"); moveto(140,180); outtext("with a volume 1400 times greater than"); moveto(140,200); outtext("that of the earth. Jupiter's colorful"); moveto(140,220); outtext("bands are caused by strong atmospheric."); moveto(140,240); outtext("currents and accentuated by a dense cloud"); moveto(140,260); outtext("cover. The massive planet, upper right, "); moveto(140,280); outtext("is shown here with the four largest of"); moveto(140,300); outtext("its sixteen satellites: Europa, center,"); } void jupiter2(void) { setfillstyle(1,BLACK); bar(130,80,500,360); settextstyle(SMALL_FONT,HORIZ_DIR,5); setcolor(GREEN); moveto(140,120); outtext("nearest Jupiter, Io upper left, Callisto"); moveto(140,140); outtext("lower left, and Ganymede lower right."); } void saturn(void) { int no,option; cleardevice(); data(); setcolor(4); settextstyle(SMALL_FONT,HORIZ_DIR,6); moveto(280,51); outtext("SATURN"); saturn1(); no=1; do { option=getch(); if(option=='b'||option=='B') { display(); details(); } if(option==73) /* page up */ { if(no==2) { no=1; saturn1(); } } else if(option==81) /* page down */ { if(no==1) { no=2; saturn2(); } } }while(option!='b'||option!='B'); } void saturn1(void) { setfillstyle(1,BLACK); bar(130,80,500,360); int xc1=310,yc1=120; int rad1=35; setcolor(13); as(xc1,yc1,rad1); settextstyle(SMALL_FONT,HORIZ_DIR,5); setcolor(GREEN); moveto(140,160); outtext("Saturn, distinguished by its rings, ranks"); moveto(140,180); outtext("as the second largest planet-Jupiter is"); moveto(140,200); outtext("the largest-in the solar system. In 1610"); moveto(140,220); outtext("the Italian physicist and astronomer Galileo"); moveto(140,240); outtext("discovered the ring system using one of the"); moveto(140,260); outtext("first telescopes ever made. Although the"); moveto(140,280); outtext("planet formed more than 4 billion years"); moveto(140,300); outtext("ago, it continues to settle and contract,"); } void saturn2(void) { setfillstyle(1,BLACK); bar(130,80,500,360); settextstyle(SMALL_FONT,HORIZ_DIR,5); setcolor(GREEN); moveto(140,120); outtext("generating three times as much heat as it"); moveto(140,140); outtext("receives from the sun. The Hubble Space"); moveto(140,160); outtext("Telescope obtained this image of Saturn"); moveto(140,180); outtext("on August 26, 1990."); } void venus(void) { int no,option; cleardevice(); data(); setcolor(4); settextstyle(SMALL_FONT,HORIZ_DIR,6); moveto(280,51); outtext("VENUS"); venus1(); no=1; do { option=getch(); if(option=='b'||option=='B') { display(); details(); } if(option==73) /* page up */ { if(no==2) { no=1; venus1(); } } else if(option==81) /* page down */ { if(no==1) { no=2; venus2(); } } }while(option!='b'||option!='B'); } void venus1(void) { setfillstyle(1,BLACK); bar(130,80,500,360); int xc1=310,yc1=120; int rad1=35; setcolor(GREEN); as(xc1,yc1,rad1); settextstyle(SMALL_FONT,HORIZ_DIR,5); setcolor(GREEN); moveto(140,160); outtext("Venus is the brightest object in our sky,"); moveto(140,180); outtext("after the sun and moon. Swirling clouds of"); moveto(140,200); outtext("sulfur and sulfuric acid obscure Venus's"); moveto(140,220); outtext("surface and inhibited study of the planet"); moveto(140,240); outtext("from earth until technology permitted space"); moveto(140,260); outtext("vehicles, outfitted with probes, to visit it."); moveto(140,280); outtext("Probes determined that Venus is the hottest of"); moveto(140,300); outtext("the planets, with a surface temperature of about"); } void venus2(void) { setfillstyle(1,BLACK); bar(130,80,500,360); settextstyle(SMALL_FONT,HORIZ_DIR,5); setcolor(GREEN); moveto(140,120); outtext("462 ~C (864 ~F). Scientists believe a greenhouse"); moveto(140,140); outtext("effect causes the extreme temperature,"); moveto(140,160); outtext("hypothesizing that the planet's thick clouds"); moveto(140,180); outtext("and dense atmosphere trap energy from the sun."); } void earth(void) { int no,option,i,j; cleardevice(); data(); setcolor(4); settextstyle(SMALL_FONT,HORIZ_DIR,6); moveto(280,51); outtext("EARTH"); earth1(); no=1; do { option=getch(); if(option=='b'||option=='B') { display(); details(); } if(option==73) /* page up */ { if(no==2) { no=1; earth1(); } } else if(option==81) /* page down */ { if(no==1) { no=2; earth2(); } } }while(option!='b'||option!='B'); } void earth1(void) { setfillstyle(1,BLACK); bar(130,80,500,360); int xc1=310,yc1=120; int rad1=35; setcolor(1); as(xc1,yc1,rad1); settextstyle(SMALL_FONT,HORIZ_DIR,5); setcolor(GREEN); moveto(140,160); outtext("An oxygen-rich and protective atmosphere,"); moveto(140,180); outtext("moderate temperatures, abundant water, and"); moveto(140,200); outtext("a varied chemical composition allow earth"); moveto(140,220); outtext("to support life, the only planet to do so."); moveto(140,240); outtext("The slightly pear-shaped planet is composed"); moveto(140,260); outtext("of rock and metal, which are present in molten"); moveto(140,280); outtext("form beneath its surface. This photograph,taken"); moveto(140,300); outtext("by the Apollo 17 spacecraft in 1972, shows "); } void earth2(void) { setfillstyle(1,BLACK); bar(130,80,500,360); settextstyle(SMALL_FONT,HORIZ_DIR,5); setcolor(GREEN); moveto(140,120); outtext("Arabia, the African continent, and Antarctica"); moveto(140,140); outtext("(most of the white area near the bottom)."); } void uranus(void) { int no,option; cleardevice(); data(); setcolor(4); settextstyle(SMALL_FONT,HORIZ_DIR,6); moveto(280,51); outtext("URANUS"); uranus1(); no=1; do { option=getch(); if(option=='b'||option=='B') { display(); details(); } if(option==73) /* page up */ { if(no==2) { no=1; uranus1(); } } else if(option==81) /* page down */ { if(no==1) { no=2; uranus2(); } } }while(option!='b'||option!='B'); } void uranus1(void) { setfillstyle(1,BLACK); bar(130,80,500,360); int xc1=310,yc1=120; int rad1=35; setcolor(11); as(xc1,yc1,rad1); settextstyle(SMALL_FONT,HORIZ_DIR,5); setcolor(GREEN); moveto(140,160); outtext("Uranus is almost 15 times as massive as"); moveto(140,180); outtext("the Earth, and its volume exceeds that"); moveto(140,200); outtext("of the latter by more than 50 times."); moveto(140,220); outtext("An analysis of radio emissions from Uranus"); moveto(140,240); outtext("magnetic field has enabled investigators"); moveto(140,260); outtext("of rock and metal, which are present in molten"); moveto(140,280); outtext("to estimate the rotation period of the"); moveto(140,300); outtext("planet to be about 17.24 hours. Uranus"); } void uranus2(void) { setfillstyle(1,BLACK); bar(130,80,500,360); settextstyle(SMALL_FONT,HORIZ_DIR,5); setcolor(GREEN); moveto(140,120); outtext("axis of rotation is unusual in that it"); moveto(140,140); outtext("lies in the plane of its orbit, and so"); moveto(140,160); outtext("Uranus appears to spin on its side. The axes"); moveto(140,180); outtext("of all other planets in the solar system are"); moveto(140,200); outtext("roughly perpendicular to the plane of their"); moveto(140,220); outtext("orbits."); } void neptune(void) { int no,option; cleardevice(); data(); setcolor(4); settextstyle(SMALL_FONT,HORIZ_DIR,6); moveto(280,51); outtext("NEPTUNE"); neptune1(); no=1; do { option=getch(); if(option=='b'||option=='B') { display(); details(); } if(option==73) { if(no==2) { no=1; neptune1(); } } else if(option==81) { if(no==1) { no=2; neptune2(); } } }while(option!='b'||option!='B'); } void neptune1(void) { setfillstyle(1,BLACK); bar(130,80,500,360); int xc1=310,yc1=120; int rad1=35; setcolor(12); as(xc1,yc1,rad1); settextstyle(SMALL_FONT,HORIZ_DIR,5); setcolor(GREEN); moveto(140,160); outtext("The 1989 Voyager 2 mission produced this"); moveto(140,180); outtext("false-color image of Neptune showing the"); moveto(140,200); outtext("different components of Neptune's atmosphere."); moveto(140,220); outtext("The red layer shows scattered sunlight from"); moveto(140,240); outtext("a haze around the planet, the blue/green"); moveto(140,260); outtext("indicates methane, and the white areas are"); moveto(140,280); outtext("high-level clouds that reflect sunlight"); moveto(140,300); outtext("above the atmosphere."); } void neptune2(void) { setfillstyle(1,BLACK); bar(130,80,500,360); settextstyle(SMALL_FONT,HORIZ_DIR,5); setcolor(GREEN); moveto(140,120); outtext("Neptune is the eighth planet in average"); moveto(140,140); outtext("distance from the Sun"); } void mars(void) { int no,option; cleardevice(); data(); setcolor(4); settextstyle(SMALL_FONT,HORIZ_DIR,6); moveto(280,51); outtext("MARS"); mars1(); no=1; do { option=getch(); if(option=='b'||option=='B') { display(); details(); } if(option==73) { if(no==2) { no=1; mars1(); } } else if(option==81) { if(no==1) { no=2; mars2(); } } }while(option!='b'||option!='B'); } void mars1(void) { setfillstyle(1,BLACK); bar(130,80,500,360); int xc1=310,yc1=120; int rad1=35; setcolor(4); as(xc1,yc1,rad1); settextstyle(SMALL_FONT,HORIZ_DIR,5); setcolor(GREEN); moveto(140,160); outtext("Unpiloted spacecraft from the United States,"); moveto(140,180); outtext("launched between 1964 and 1976, have supplied"); moveto(140,200); outtext("the most detailed information on Mars."); moveto(140,220); outtext("From this data, scientists determined that"); moveto(140,240); outtext("the planet's atmosphere predominantly"); moveto(140,260); outtext("consists of carbon dioxide (CO2), with small"); moveto(140,280); outtext("amounts of nitrogen, oxygen, and water vapor"); moveto(140,300); outtext("also present. Due to the thinness of the"); } void mars2(void) { setfillstyle(1,BLACK); bar(130,80,500,360); settextstyle(SMALL_FONT,HORIZ_DIR,5); setcolor(GREEN); moveto(140,80); outtext("atmosphere, daily temperatures often vary as"); moveto(140,100); outtext("much as 100° C (180° F). In general, surface"); moveto(140,120); outtext("temperatures are too cold and surface pressures"); moveto(140,140); outtext("too low for water to exist in a liquid state on"); moveto(140,160); outtext("mars, so the planet resembles a cold,"); moveto(140,180); outtext("high-altitude desert."); } void sun(void) { int no,option; cleardevice(); data(); setcolor(4); settextstyle(SMALL_FONT,HORIZ_DIR,6); moveto(280,51); outtext("SUN"); sun1(); no=1; do { option=getch(); if(option=='b'||option=='B') { display(); details(); } if(option==73) { if(no==2) { no=1; sun1(); } } else if(option==81) { if(no==1) { no=2; sun2(); } } }while(option!='b'||option!='B'); } void sun1(void) { setfillstyle(1,BLACK); bar(130,80,509,360); int xc1=310,yc1=120; int rad1=35; setcolor(YELLOW); as(xc1,yc1,rad1); settextstyle(SMALL_FONT,HORIZ_DIR,5); setcolor(GREEN); moveto(140,160); outtext("The Sun is a sphere of luminous gas"); moveto(140,180); outtext("1,392,000 km (864,950 miles) in diameter."); moveto(140,200); outtext("Its mass is 1.99 grams, or about 330,000"); moveto(140,220); outtext("times the mass of the Earth.The Sun generates"); moveto(140,240); outtext("energy by nuclear fusion reactions in its"); moveto(140,260); outtext("core at a rate of 3.86 ergs per second."); moveto(140,280); outtext("Although its core temperature is close to"); moveto(140,300); outtext("15,000,000 K, the temperature of the surface"); } void sun2(void) { setfillstyle(1,BLACK); bar(130,80,500,360); settextstyle(SMALL_FONT,HORIZ_DIR,5); setcolor(GREEN); moveto(140,120); outtext("of the Sun is only about 6,000 K. This is"); moveto(140,140); outtext("average in terms of stellar temperatures,"); moveto(140,160); outtext("and the Sun is an average star in every respect."); } /*------------------------DATA MENU---------------------*/ void data(void) { int i; cleardevice(); display(); setfillstyle(1,BLACK); bar(125,50,510,410); rectangle(125,50,510,410); line(125,70,510,70); line(125,370,510,370); settextstyle(DEFAULT_FONT,HORIZ_DIR,1); moveto(150,380); outtext("[B] TO MENU"); moveto(400,380); outtext("PGUP"); moveto(400,395); outtext("PGDN"); } /*----------------------------CIRCLE IN DATDBOX--------------*/ void as(int x,int y,int r) { int i; for(i=0;i<=r;i++) { circle(x,y,i); } } /*---------------------------CREDITS----------------------*/ void credits(void) { int i,op; setcolor(9); for(i=400;i>=-220;i--) { if(kbhit()) { break; } cleardevice(); settextstyle(SANS_SERIF_FONT,HORIZ_DIR,6); moveto(150,i); outtext("PROGRAMMER"); settextstyle(SANS_SERIF_FONT,HORIZ_DIR,2); moveto(200,i+80); outtext("FAHAD AZIZ QADWAI"); delay(25); } display(); } /*------------------------GOOD BYE------------------*/ void end(void) { int r; settextstyle(TRIPLEX_FONT,HORIZ_DIR,4); setcolor(9); for(r=0;r<=180;r++) { cleardevice(); moveto(220,r); outtext("GOOD BYE"); delay(15); } } /*----------------------------QUIT------------------------------*/ void quit(void) { end(); closegraph(); exit(0); } /*------------------------------THE END-------------------------------*/