Você está na página 1de 35

Name: E.S.

Adithya

Class: XII.A
S.No. CONTENT Pg. No.
1 Introduction and Statement 1
2 System Configurations 2
3 Header Files used 3
4 Functions used 4-5
5 Programme Code 6-27
6 Output 27-30
7 Merits and Demerits 31
8 Conclusion and Bibliography 32
INTRODUCTION:

This project is based on the periodic table. We all know that


everything around us is made up of atoms. Atoms are the basic unit of matter.
They all differ from one another due to the presence of various elements.
Periodic table is the arrangement of these elements in table in a particular
order, that is all those elements which have nearly the same physical and
chemical properties are arranged together in the order of their increasing
atomic number.

This is a chemistry based project which enables the user to


search for any definition related to the periodic tableusing numbers and on
entering the choice, it displays the definition.

STATEMENT OF PROJECT:

To write a program in C++ to create a periodic table and


display its output window. Then allow the userto choose any term by using
number and to display the definition of the chosen term by using ASCII
character.
SYSTEM CONFIGURATIONS:

1. Hardware

a. 128 MB RAM
b. 40 GB hard disc

2. Software
a. Borland C++
b.Turboc3
c. BIG File
HEADER FILES USED:
● IOSTREAM.H
● CONIO.H
● GRAPHICS.H
● STDIO.H
● CTYPE.H
● STDLIB.H
● PROCESS.H
● STRING.H
● LIMITS.H
● DOS.H
● FSTREAM.H
USER DEFINED FUNCTIONS USED:
➢v2():
♥ This function is used to show the program developer name.
➢v1():
♥ This function is used to display computer science project with graphics
mode and other background effects.
➢TABLE():
♥ This function is used to display the periodic table.
➢CHOICE():
♥ This function is used to display the terms related to periodic table and
allows the user to choose any term. This function is used to call the
Function SECHOICE().
➢SECHOICE():
♥ This function is used to display the physical properties of the selected
elements. It is used to call user defined function.
SPECIAL FUNCTIONS USED:

➢TEXTCOLOR():
♥ Text color selects the color for the text. It is present in the conio.h
➢GETCH():
♥ It gets a character from console, but does not echoes in screen. It is
present in conio.h
➢EXIT():
♥ It is used to terminate the program. It is present in math.h
➢SETCOLOR():
♥ It sets current drawing color. It is present in graphics.h
➢SETTEXTSTYLE():
♥ It sets the current text characteristics. It is present in math.h
➢RECTANGLE():
♥ IT draws rectangle in graphics mode. It is present in graphics.h
➢BAR():
♥ It draws a bar. It is present in graphics.h
➢ITOA():
♥ It converts an integer to string. It is present in stdlib.h
➢DELAY():
♥ It suspends execution for interval. It is present in dos.h
➢OUTTEXTXY():
♥ It displays the string at the specified location. It is present in graphics.h
➢CLOSEGRAPH():
♥ It shuts the graphics system. It is present in graphics.h
➢CLRSCR():
♥ It clears the screen. It is present in conio.h
PROGRAMME CODE:
/* COMPUTER SCIENCE INVESTIGATORY PROJECT FOR CLASS XII.
---------------------------------------------------------------------------------
Program Title : PERIODIC TABLE
Programmer : E.S.Adithya
Assisted by : R.Selvarathnam and S.Nikil Johnson
*/
#include<iostream.h>
#include<conio.h>
#include<string.h>
#include<stdlib.h>
#include<stdio.h>
#include<ctype.h>
#include<process.h>
#include<limits.h>
#include<fstream.h>
#include<dos.h>
#include<graphics.h>
intgd=DETECT;
int gm;
int o=999;
int j;
char w[300];
charch;
//******************************
void table()
{
initgraph(&gd,&gm,"C:\\Turboc3\\BGI");
settextstyle(0,EMPTY_FILL,5);
setcolor(BLUE);
outtextxy(20,10,"PERIODIC TABLE");
setcolor(WHITE); //periods
line(595,100,630,100);
line(0,100,35,100);
line(0,130,70,130);
line(420,130,630,130);
line(0,160,70,160);
line(420,160,630,160);
line(0,190,630,190);
line(0,220,630,220);
line(0,250,630,250);
line(0,280,630,280);
line(0,310,630,310);
//groups

line(0,100,0,310);
line(35,100,35,310);
line(70,130,70,310);
line(105,190,105,310);
line(140,190,140,310);
line(175,190,175,310);
line(210,190,210,310);
line(245,190,245,310);
line(280,190,280,310);
line(315,190,315,310);
line(350,190,350,310);
line(385,190,385,310);
line(420,130,420,310);
line(455,130,455,310);
line(490,130,490,310);
line(525,130,525,310);
line(560,130,560,310);
line(595,100,595,310);
line(630,100,630,310);
settextstyle(0,EMPTY_FILL,1);
setcolor(WHITE);
//group no

outtextxy(15,90,"1");
outtextxy(50,90,"2");
outtextxy(85,90,"3");
outtextxy(120,90,"4");
outtextxy(155,90,"5");
outtextxy(190,90,"6");
outtextxy(225,90,"7");
outtextxy(260,90,"8");
outtextxy(295,90,"9");
outtextxy(325,90,"10");
outtextxy(360,90,"11");
outtextxy(395,90,"12");
outtextxy(430,90,"13");
outtextxy(465,90,"14");
outtextxy(500,90,"15");
outtextxy(535,90,"16");
outtextxy(605,90,"18");
outtextxy(570,90,"17");
//elements name
outtextxy(10,105,"1.");
outtextxy(10,120,"H");

outtextxy(10,135,"3.");
outtextxy(10,150,"Li");

outtextxy(10,165,"11.");
outtextxy(10,180,"Na");

outtextxy(10,195,"19.");
outtextxy(10,210,"K");

outtextxy(10,225,"37.");
outtextxy(10,240,"Rb");

outtextxy(10,255,"55.");
outtextxy(10,270,"Cs");

outtextxy(10,285,"88.");
outtextxy(10,300,"Fr");

outtextxy(45,135,"4.");
outtextxy(45,150,"Be");

outtextxy(45,165,"12.");
outtextxy(45,180,"Mg");

outtextxy(45,195,"20.");
outtextxy(45,210,"Ca");

outtextxy(45,225,"38.");
outtextxy(45,240,"Sr");

outtextxy(45,255,"56.");
outtextxy(45,270,"Ba");

outtextxy(45,285,"88.");
outtextxy(45,300,"Ra");

outtextxy(80,195,"21.");
outtextxy(80,210,"Sc");

outtextxy(80,225,"39.");
outtextxy(80,240,"Y");
outtextxy(80,255,"57-");
outtextxy(80,270,"71" );

outtextxy(80,285,"89-");
outtextxy(80,300,"103");

outtextxy(115,195,"22.");
outtextxy(115,210,"Ti");

outtextxy(115,225,"40.");
outtextxy(115,240,"Zr");

outtextxy(115,255,"72.");
outtextxy(115,270,"Hf" );

outtextxy(110,285,"104.");
outtextxy(115,300,"Rf");

outtextxy(150,195,"23.");
outtextxy(150,210,"V");

outtextxy(150,225,"41.");
outtextxy(150,240,"Nb");

outtextxy(150,255,"73.");
outtextxy(150,270,"Ta" );

outtextxy(145,285,"105.");
outtextxy(150,300,"Db");

outtextxy(185,195,"24.");
outtextxy(185,210,"Cr");

outtextxy(185,225,"42.");
outtextxy(185,240,"Mo");

outtextxy(185,255,"74.");
outtextxy(185,270,"W" );

outtextxy(180,285,"106.");
outtextxy(185,300,"Sg");

outtextxy(220,195,"25.");
outtextxy(220,210,"Mn");

outtextxy(220,225,"43.");
outtextxy(220,240,"Tc");

outtextxy(220,255,"75.");
outtextxy(220,270,"Re" );

outtextxy(215,285,"107.");
outtextxy(220,300,"Bh");

outtextxy(255,195,"26.");
outtextxy(255,210,"Fe");

outtextxy(255,225,"44.");
outtextxy(255,240,"Ru");

outtextxy(255,255,"76.");
outtextxy(255,270,"Os" );

outtextxy(250,285,"108.");
outtextxy(255,300,"Hs");

outtextxy(290,195,"27.");
outtextxy(290,210,"Co");

outtextxy(290,225,"45.");
outtextxy(290,240,"Rh");

outtextxy(290,255,"77.");
outtextxy(290,270,"Ir" );

outtextxy(285,285,"109.");
outtextxy(290,300,"Mt");

outtextxy(325,195,"28.");
outtextxy(325,210,"Ni");

outtextxy(325,225,"46.");
outtextxy(325,240,"Pd");

outtextxy(325,255,"78.");
outtextxy(325,270,"Pt" );

outtextxy(320,285,"110.");
outtextxy(325,300,"Ds");

outtextxy(360,195,"29.");
outtextxy(360,210,"Cu");
outtextxy(360,225,"47.");
outtextxy(360,240,"Ag");

outtextxy(360,255,"79.");
outtextxy(360,270,"Au" );

outtextxy(355,285,"111.");
outtextxy(360,300,"Rg");

outtextxy(395,195,"30.");
outtextxy(395,210,"Zn");

outtextxy(395,225,"48.");
outtextxy(395,240,"Cd");

outtextxy(395,255,"80.");
outtextxy(395,270,"Hg" );

outtextxy(390,285,"112.");
outtextxy(395,300,"Cn");

outtextxy(435,135,"5.");
outtextxy(435,150,"B");

outtextxy(430,165,"13.");
outtextxy(430,180,"Al");

outtextxy(430,195,"31.");
outtextxy(430,210,"Ga");

outtextxy(430,225,"49.");
outtextxy(430,240,"In");

outtextxy(430,255,"81.");
outtextxy(430,270,"Tl" );

outtextxy(425,285,"113.");
outtextxy(425,300,"Uut");

outtextxy(465,135,"6.");
outtextxy(465,150,"C");

outtextxy(465,165,"14.");
outtextxy(465,180,"Si");
outtextxy(465,195,"32.");
outtextxy(465,210,"Ge");

outtextxy(465,225,"50.");
outtextxy(465,240,"Sn");

outtextxy(465,255,"82.");
outtextxy(460,270,"Pb" );

outtextxy(460,285,"114.");
outtextxy(460,300,"Fl");

outtextxy(500,135,"7.");
outtextxy(500,150,"N");

outtextxy(500,165,"15.");
outtextxy(505,180,"P");

outtextxy(500,195,"33.");
outtextxy(500,210,"As");

outtextxy(500,225,"51.");
outtextxy(500,240,"Sb");

outtextxy(500,255,"83.");
outtextxy(500,270,"Bi" );

outtextxy(495,285,"115.");
outtextxy(495,300,"Uup");

outtextxy(535,135,"8.");
outtextxy(540,150,"O");

outtextxy(535,165,"16.");
outtextxy(540,180,"S");

outtextxy(535,195,"34.");
outtextxy(535,210,"Se");

outtextxy(535,225,"52.");
outtextxy(535,240,"Te");

outtextxy(535,255,"84.");
outtextxy(535,270,"Po" );

outtextxy(530,285,"116.");
outtextxy(535,300,"Lv");

outtextxy(570,135,"8.");
outtextxy(575,150,"F");

outtextxy(570,165,"17.");
outtextxy(570,180,"Cl");

outtextxy(570,195,"35.");
outtextxy(570,210,"Br");

outtextxy(570,225,"53.");
outtextxy(575,240,"I");

outtextxy(570,255,"85.");
outtextxy(570,270,"At" );

outtextxy(565,285,"117.");
outtextxy(565,300,"Uus");

outtextxy(605,105,"2.");
outtextxy(605,120,"He");

outtextxy(605,135,"10.");
outtextxy(605,150,"Ne");

outtextxy(605,165,"18.");
outtextxy(605,180,"Ar");

outtextxy(605,195,"36.");
outtextxy(605,210,"Kr");

outtextxy(605,225,"54.");
outtextxy(605,240,"Xe");

outtextxy(605,255,"86.");
outtextxy(605,270,"Rn" );

outtextxy(600,285,"118.");
outtextxy(600,300,"Uuo");

//lanthenoidsactinoids
line(105,380,630,380);
line(105,410,630,410);
line(105,440,630,440);
line(105,380,105,440);
line(140,380,140,440);
line(175,380,175,440);
line(210,380,210,440);
line(245,380,245,440);
line(280,380,280,440);
line(315,380,315,440);
line(350,380,350,440);
line(385,380,385,440);
line(420,380,420,440);
line(455,380,455,440);
line(490,380,490,440);
line(525,380,525,440);
line(560,380,560,440);
line(595,380,595,440);
line(630,380,630,440);
//block name

line(0,85,70,85);
line(75,175,415,175);
line(75,175,75,178);
line(415,175,415,178);
line(70,85,70,88);
line(0,85,0,88);
line(70,85,70,88);
line(420,85,630,85);
line(420,85,420,88);
line(630,85,630,88);
line(105,365,630,365);
line(105,365,105,370);
line(630,365,630,370);
//elements of lenthenoids and actenoids
outtextxy(115,385,"57.");
outtextxy(115,400,"La.");

outtextxy(115,415,"89.");
outtextxy(115,430,"Ac");

outtextxy(150,385,"58.");
outtextxy(150,400,"Ce");

outtextxy(150,415,"90.");
outtextxy(150,430,"Th");

outtextxy(185,385,"59.");
outtextxy(185,400,"Pr");
outtextxy(185,415,"91.");
outtextxy(185,430,"Pa");

outtextxy(220,385,"60.");
outtextxy(220,400,"Nd");

outtextxy(220,415,"92.");
outtextxy(225,430,"U");

outtextxy(255,385,"61.");
outtextxy(255,400,"Pm");

outtextxy(255,415,"93.");
outtextxy(255,430,"Np");

outtextxy(290,385,"62.");
outtextxy(290,400,"Sm");

outtextxy(290,415,"94.");
outtextxy(290,430,"Pu");

outtextxy(325,385,"63.");
outtextxy(325,400,"Eu");

outtextxy(325,415,"95.");
outtextxy(325,430,"Am");

outtextxy(360,385,"64.");
outtextxy(360,400,"Gd");

outtextxy(360,415,"96.");
outtextxy(360,430,"Cm");

outtextxy(395,385,"65.");
outtextxy(395,400,"Tb");

outtextxy(395,415,"97.");
outtextxy(395,430,"Bk");

outtextxy(430,385,"66.");
outtextxy(430,400,"Dy");

outtextxy(430,415,"98.");
outtextxy(430,430,"Cf");

outtextxy(465,385,"67.");
outtextxy(465,400,"Ho");

outtextxy(465,415,"99.");
outtextxy(465,430,"Es");

outtextxy(500,385,"68.");
outtextxy(500,400,"Er");

outtextxy(495,415,"100.");
outtextxy(500,430,"Fm");

outtextxy(535,385,"69.");
outtextxy(535,400,"Tm");

outtextxy(530,415,"101.");
outtextxy(535,430,"Md");

outtextxy(570,385,"70.");
outtextxy(570,400,"Yb");

outtextxy(565,415,"102.");
outtextxy(570,430,"No");

outtextxy(605,385,"71.");
outtextxy(605,400,"Lu");

outtextxy(600,415,"103.");
outtextxy(605,430,"Lr");

settextstyle(0,EMPTY_FILL,1);
setcolor(RED);
outtextxy(8,75,"s-block");
outtextxy(500,75,"p-block");
outtextxy(210,165,"d-block");
outtextxy(330,355,"f-block");
setcolor(YELLOW);

settextstyle(0,EMPTY_FILL,1);
setcolor(GREEN);
outtextxy(0,390,"Lanthanides");
outtextxy(0,420,"Actinides");
delay(6500);
}
//******************************
void choice();
void choice()
{
initgraph(&gd,&gm,"C:\\Turboc3\\BGI");
cout<<"\n\n\n\n\n\n\n\n\n\n\n\t\t\t\t\t\t\t\t ";

rectangle(20,20,620,430);
rectangle(21,21,619,429);
rectangle(22,22,618,428);

outtextxy(490,150,"Your Choice");
rectangle(480,140,590,200);
line(480,165,590,165);
outtextxy(70,130,"1.Periodic Table");
outtextxy(70,150,"2.Elements");
outtextxy(70,170,"3.Atoms");
outtextxy(70,190,"4.Nucleus");
outtextxy(70,210,"5.Proton");
outtextxy(70,230,"6.Neutron");
outtextxy(70,250,"7.Electron");
outtextxy(70,270,"8.Energy Level");
outtextxy(70,300,"9.Orbital");
outtextxy(70,320,"10.Valence electron");
outtextxy(70,340,"11.Periods");
outtextxy(70,360,"12.Groups");
outtextxy(70,380,"13.Ionization");
outtextxy(70,400,"14.Cation");
//******************************************
outtextxy(290,130,"15.Anion");
outtextxy(290,150,"16.Atomic no.");
outtextxy(290,170,"17.Mass no");
outtextxy(290,190,"18.Metal");
outtextxy(290,210,"19.Non-Metal");
outtextxy(290,230,"20.Metalloid");
outtextxy(290,250,"21.Alkali Family");
outtextxy(290,270,"22.Alkali earth metal");
outtextxy(290,300,"23.Calchogen");
outtextxy(290,320,"24.Halogen");
outtextxy(290,340,"25.Noble gas");
outtextxy(290,360,"26.Isotope");
outtextxy(290,380,"27.Lanthanide");
outtextxy(290,400,"28.Actinides");

outtextxy(290,450,"EXIT(0)");
settextstyle(SIMPLEX_FONT,HORIZ_DIR,3);
outtextxy(140,50,"TERMS RELATED TO THE PERIODIC TABLE");
//***********************************************************
cin>>o;
if(o==0)
{exit(1);}
closegraph();
}
voidsechoice();
voidsechoice()
{
fstream f("datad.txt",ios::in|ios::out);
for(inti=0;i<1;i++)
{
clrscr();
switch(o)
{
case 1:initgraph(&gd, &gm,"C:\\TURBOC3\\BGI");
rectangle(20,20,620,100);
rectangle(21,21,619,99);
rectangle(22,22,618,98);
outtextxy(280,55,"Periodic Table");
f.getline(w,300,'%');
cout<<"\n\n\n\n\n\n\n "<<w;
cout<<"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\tDo you want to continue(y/n)?:";
cin>>ch;
break;
case 2:initgraph(&gd, &gm,"C:\\TURBOC3\\BGI");
rectangle(20,20,620,100);
rectangle(21,21,619,99);
rectangle(22,22,618,98);
outtextxy(280,55,"Element");
for(j=0;j<2;j++)
{f.getline(w,300,'%'); }
cout<<"\n\n\n\n\n\n\n "<<w;
cout<<"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\tDo you want to continue(y/n)?:";
cin>>ch;
break;
case 3:initgraph(&gd, &gm,"C:\\TURBOC3\\BGI");
rectangle(20,20,620,100);
rectangle(21,21,619,99);
rectangle(22,22,618,98);
outtextxy(280,55,"Atom");
for(j=0;j<3;j++)
{f.getline(w,300,'%'); }
cout<<"\n\n\n\n\n\n\n"<<w;
cout<<"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\tDo you want to continue(y/n)?:";
cin>>ch;
break;
case 4:initgraph(&gd, &gm,"C:\\TURBOC3\\BGI");
rectangle(20,20,620,100);
rectangle(21,21,619,99);
rectangle(22,22,618,98);
outtextxy(280,55,"Nucleus");
for(j=0;j<4;j++)
{f.getline(w,300,'%'); }
cout<<"\n\n\n\n\n\n\n"<<w;
cout<<"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\tDo you want to continue(y/n)?:";
cin>>ch;
break;
case 5:initgraph(&gd, &gm,"C:\\TURBOC3\\BGI");
rectangle(20,20,620,100);
rectangle(21,21,619,99);
rectangle(22,22,618,98);
outtextxy(280,55,"Proton");
for(j=0;j<5;j++)
{f.getline(w,300,'%'); }
cout<<"\n\n\n\n\n\n\n\t"<<w;
cout<<"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\tDo you want to continue(y/n)?:";
cin>>ch;
break;
case 6:initgraph(&gd, &gm,"C:\\TURBOC3\\BGI");
rectangle(20,20,620,100);
rectangle(21,21,619,99);
rectangle(22,22,618,98);
outtextxy(280,55,"Neutron");
for(j=0;j<6;j++)
{f.getline(w,300,'%'); }
cout<<"\n\n\n\n\n\n\n"<<w;
cout<<"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\tDo you want to continue(y/n)?:";
cin>>ch;
break;
case 7:initgraph(&gd, &gm,"C:\\TURBOC3\\BGI");
rectangle(20,20,620,100);
rectangle(21,21,619,99);
rectangle(22,22,618,98);
outtextxy(280,55,"Electron");
for(j=0;j<7;j++)
{f.getline(w,300,'%'); }

cout<<"\n\n\n\n\n\n\n"<<w;
cout<<"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\tDo you want to continue(y/n)?:";
cin>>ch;
break;
case 8 :initgraph(&gd, &gm,"C:\\TURBOC3\\BGI");
rectangle(20,20,620,100);
rectangle(21,21,619,99);
rectangle(22,22,618,98);
outtextxy(280,55,"Energy Level");
for(j=0;j<8;j++)
{f.getline(w,300,'%'); }
cout<<"\n\n\n\n\n\n\n\t"<<w;
cout<<"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\tDo you want to continue(y/n)?:";
cin>>ch;
break;
case 9:initgraph(&gd, &gm,"C:\\TURBOC3\\BGI");
rectangle(20,20,620,100);
rectangle(21,21,619,99);
rectangle(22,22,618,98);
outtextxy(280,55,"Orbital");
for(j=0;j<9;j++)
{f.getline(w,300,'%'); }
cout<<"\n\n\n\n\n\n\n "<<w;
cout<<"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\tDo you want to continue(y/n)?:";
cin>>ch;
break;
case 10:initgraph(&gd, &gm,"C:\\TURBOC3\\BGI");
rectangle(20,20,620,100);
rectangle(21,21,619,99);
rectangle(22,22,618,98);
outtextxy(280,55,"Valence electron");
for(j=0;j<10;j++)
{f.getline(w,300,'%'); }
cout<<"\n\n\n\n\n\n\n\t\t"<<w;
cout<<"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\tDo you want to continue(y/n)?:";
cin>>ch;
break;
case 11:initgraph(&gd, &gm,"C:\\TURBOC3\\BGI");
rectangle(20,20,620,100);
rectangle(21,21,619,99);
rectangle(22,22,618,98);
outtextxy(280,55,"Periods");
for(j=0;j<11;j++)
{f.getline(w,300,'%'); }
cout<<"\n\n\n\n\n\n\n\t\t"<<w;
cout<<"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\tDo you want to continue(y/n)?:";
cin>>ch;
break;
case 12:initgraph(&gd, &gm,"C:\\TURBOC3\\BGI");
rectangle(20,20,620,100);
rectangle(21,21,619,99);
rectangle(22,22,618,98);
outtextxy(280,55,"Groups");
for(j=0;j<12;j++)
{f.getline(w,300,'%'); }
cout<<"\n\n\n\n\n\n\n\t\t"<<w;
cout<<"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\tDo you want to continue(y/n)?:";
cin>>ch;
break;
case 13:initgraph(&gd, &gm,"C:\\TURBOC3\\BGI");
rectangle(20,20,620,100);
rectangle(21,21,619,99);
rectangle(22,22,618,98);
outtextxy(280,55,"Ionization");
for(j=0;j<13;j++)
{f.getline(w,300,'%'); }
cout<<"\n\n\n\n\n\n\n"<<w;
cout<<"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\tDo you want to continue(y/n)?:";
cin>>ch;
break;
case 14:initgraph(&gd, &gm,"C:\\TURBOC3\\BGI");
rectangle(20,20,620,100);
rectangle(21,21,619,99);
rectangle(22,22,618,98);
outtextxy(280,55,"Cation");
for(j=0;j<14;j++)
{f.getline(w,300,'%'); }
cout<<"\n\n\n\n\n\n\n\t\t\t"<<w;
cout<<"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\tDo you want to continue(y/n)?:";
cin>>ch;
break;
case 15:initgraph(&gd, &gm,"C:\\TURBOC3\\BGI");
rectangle(20,20,620,100);
rectangle(21,21,619,99);
rectangle(22,22,618,98);
outtextxy(280,55,"Anion");
for(j=0;j<15;j++)
{f.getline(w,300,'%'); }
cout<<"\n\n\n\n\n\n\n\t\t"<<w;
cout<<"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\tDo you want to continue(y/n)?:";
cin>>ch;
break;
case 16:initgraph(&gd, &gm,"C:\\TURBOC3\\BGI");
rectangle(20,20,620,100);
rectangle(21,21,619,99);
rectangle(22,22,618,98);
outtextxy(280,55,"Atomic no.");
for(j=0;j<16;j++)
{f.getline(w,300,'%'); }
cout<<"\n\n\n\n\n\n\n\t\t"<<w;
cout<<"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\tDo you want to continue(y/n)?:";
cin>>ch;
break;
case 17:initgraph(&gd, &gm,"C:\\TURBOC3\\BGI");
rectangle(20,20,620,100);
rectangle(21,21,619,99);
rectangle(22,22,618,98);
outtextxy(280,55,"Mass no.");
for(j=0;j<17;j++)
{f.getline(w,300,'%'); }
cout<<"\n\n\n\n\n\n\n "<<w;
cout<<"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\tDo you want to continue(y/n)?:";
cin>>ch;
break;
case 18:initgraph(&gd, &gm,"C:\\TURBOC3\\BGI");
rectangle(20,20,620,100);
rectangle(21,21,619,99);
rectangle(22,22,618,98);
outtextxy(280,55,"Metal");
for(j=0;j<18;j++)
{f.getline(w,300,'%'); }
cout<<"\n\n\n\n\n\n\n\t"<<w;
cout<<"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\tDo you want to continue(y/n)?:";
cin>>ch;
break;
case 19:initgraph(&gd, &gm,"C:\\TURBOC3\\BGI");
rectangle(20,20,620,100);
rectangle(21,21,619,99);
rectangle(22,22,618,98);
outtextxy(280,55,"Non-Metal");
for(j=0;j<19;j++)
{f.getline(w,300,'%'); }
cout<<"\n\n\n\n\n\n\n"<<w;
cout<<"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\tDo you want to continue(y/n)?:";
cin>>ch;
break;
case 20:initgraph(&gd, &gm,"C:\\TURBOC3\\BGI");
rectangle(20,20,620,100);
rectangle(21,21,619,99);
rectangle(22,22,618,98);
outtextxy(280,55,"Metalloid");
for(j=0;j<20;j++)
{f.getline(w,300,'%'); }
cout<<"\n\n\n\n\n\n\n"<<w;
cout<<"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\tDo you want to continue(y/n)?:";
cin>>ch;
break;
case 21:initgraph(&gd, &gm,"C:\\TURBOC3\\BGI");
rectangle(20,20,620,100);
rectangle(21,21,619,99);
rectangle(22,22,618,98);
outtextxy(280,55,"Alkali family");
for(j=0;j<21;j++)
{f.getline(w,300,'%'); }
cout<<"\n\n\n\n\n\n\n "<<w;
cout<<"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\tDo you want to continue(y/n)?:";
cin>>ch;
break;
case 22:initgraph(&gd, &gm,"C:\\TURBOC3\\BGI");
rectangle(20,20,620,100);
rectangle(21,21,619,99);
rectangle(22,22,618,98);
outtextxy(280,55,"Alkali earth metal");
for(j=0;j<22;j++)
{f.getline(w,300,'%'); }
cout<<"\n\n\n\n\n\n\n "<<w;
cout<<"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\tDo you want to continue(y/n)?:";
cin>>ch;
break;
case 23:initgraph(&gd, &gm,"C:\\TURBOC3\\BGI");
rectangle(20,20,620,100);
rectangle(21,21,619,99);
rectangle(22,22,618,98);
outtextxy(280,55,"Calcogen");
for(j=0;j<23;j++)
{f.getline(w,300,'%'); }
cout<<"\n\n\n\n\n\n\n "<<w;
cout<<"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\tDo you want to continue(y/n)?:";
cin>>ch;
break;
case 24:initgraph(&gd, &gm,"C:\\TURBOC3\\BGI");
rectangle(20,20,620,100);
rectangle(21,21,619,99);
rectangle(22,22,618,98);
outtextxy(280,55,"Halogen");
for(j=0;j<24;j++)
{f.getline(w,300,'%'); }
cout<<"\n\n\n\n\n\n\n "<<w;
cout<<"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\tDo you want to continue(y/n)?:";
cin>>ch;
break;
case 25:initgraph(&gd, &gm,"C:\\TURBOC3\\BGI");
rectangle(20,20,620,100);
rectangle(21,21,619,99);
rectangle(22,22,618,98);
outtextxy(280,55,"Noble gas");
for(j=0;j<25;j++)
{f.getline(w,300,'%'); }
cout<<"\n\n\n\n\n\n\n "<<w;
cout<<"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\tDo you want to continue(y/n)?:";
cin>>ch;
break;
case 26:initgraph(&gd, &gm,"C:\\TURBOC3\\BGI");
rectangle(20,20,620,100);
rectangle(21,21,619,99);
rectangle(22,22,618,98);
outtextxy(280,55,"Isotope");
for(j=0;j<26;j++)
{f.getline(w,300,'%'); }
cout<<"\n\n\n\n\n\n\n "<<w;
cout<<"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\tDo you want to continue(y/n)?:";
cin>>ch;
break;
case 27:initgraph(&gd, &gm,"C:\\TURBOC3\\BGI");
rectangle(20,20,620,100);
rectangle(21,21,619,99);
rectangle(22,22,618,98);
outtextxy(280,55,"Lanthanide");
for(j=0;j<27;j++)
{f.getline(w,300,'%'); }
cout<<"\n\n\n\n\n\n\n"<<w;
cout<<"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\tDo you want to continue(y/n)?:";
cin>>ch;
break;
case 28:initgraph(&gd, &gm,"C:\\TURBOC3\\BGI");
rectangle(20,20,620,100);
rectangle(21,21,619,99);
rectangle(22,22,618,98);
outtextxy(280,55,"Actinides");
for(j=0;j<28;j++)
{f.getline(w,300,'%'); }
cout<<"\n\n\n\n\n\n\n"<<w;
cout<<"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\tDo you want to continue(y/n)?:";
cin>>ch;
break;
case 29:exit(1);
}
}
f.close();
}
void v1();
void v1()
{
initgraph(&gd,&gm,"C:\\Turboc3\\BGI");
inti,j,k,l;
textcolor(BLACK);
for(i=590,j=625,k=0,l=35;i>0;i--,j--,k++,l++)
{
delay(1);
clrscr();
setcolor(i/2);
settextstyle(1,0,5);
outtextxy(100,200,"COMPUTER SCIENCE");
outtextxy(200,250,"PROJECT");
}
setcolor(GREEN);
settextstyle(3,0,7);
int percent=0;
charpercen[110];
for(int S=200;S<=400;S++)
{
clrscr();
settextstyle(3,0,4);
outtextxy(200,150,"LOADING...");
rectangle(280,195,480,220);
bar(280,195,S+80,220);
itoa(percent,percen,10);
settextstyle(1,0,1);
outtextxy(380,197,percen);
outtextxy(405,197," %");
if(S%2==0)
percent++;
delay(100);
}
closegraph();
}
void v2();
void v2()
{
clrscr();
initgraph(&gd,&gm,"C:\\Turboc3\\BGI");
setcolor(RED);
for(int x=50;x>=20;x--)
{
sound(440);
delay(500);
nosound();
delay(160);
gotoxy(x,12);
cout<<"P R O J E C T ";
gotoxy(x,14);
textcolor(RED+WHITE);
cout<< " D E V E L O P E D B Y : ";
gotoxy(x,16);
cout<<" E.S.Adithya ";
gotoxy(x,18);
cout<<" R.Selvarathnam ";
gotoxy(x,20);
cout<<" S.Nihil Johnson ";
}
gotoxy(x,26);
cout<<" Press any Key to Continue.....";
getch();
closegraph();\

}
void main()
{
clrscr();
v1();
v2();

intgdriver=DETECT,gmode,errorcode;
initgraph(&gdriver,&gmode,"h:\tc\bin");
errorcode=graphresult();
if(errorcode!=grOk)
{
cout<<grapherrormsg(errorcode)<<endl;
getch();
}
for (inti=0;i<7;i++)
{
delay(150);
clrscr();
settextstyle(5,0,i);
setcolor(BLUE);
outtextxy(110,75," WELCOME");
outtextxy(155,150," TO");
outtextxy(100,225," PERIODIC TABLE");
}
settextstyle(8,0,1);
setcolor(RED);
outtextxy(200,450,"Press Any Key To Continue ...");
getch();

table();
A:choice();
sechoice();
if(ch=='y')
{goto A;}
getch();
}
OUTPUT:
THE INTRO-SCREEN

THE LOADING SCREEN


THE WELCOME-SCREEN

THE PERIODIC TABLE BEING DISPLAYED


THE USER INTERACTIVE SCREEN

THE OUTPUT GIVEN TO THE USER AS PER INPUT


MERITS OF THIS PROJECT:
 In this project many special characters have been used in the program
window directly.

 The periodic table is created and elements are placed in it, the whole
table is created using nearly 10 ASCII special character that is not available
in the window.

 This project shows definitions of the chosen terms related to the periodic
table.

 The user is able to view the output window and choose any term related
to the periodic table from the displayed window.

 The definitions which the users wish to see are displayed neatly.
 Many graphics features have been used in this project to make it more
neat and attractive.

DEMERITS OF THIS PROJECT:


 This program deals with only 20 terms related to the periodic table. This
can be improved by including more terms and definitions and details like
physical properties, Atomic masses and electronic configurations of the
elements etc…

CONCLUSION:
This project has been currently working with only few
definitions, but in future several features can be added such as activation of
element details, atomic models of each element, etc. Many C++ special
characters have been included in this project. This project shows the definition
of the terms related to the periodic table in the output window on choosing
any term. The program shows the details of the periodic table.
BIBLIOGRAPHY:
▪ XI C++ CSC Reader
▪ XII C++ CSC Reader
▪ XI Chemistry Reader
▪ XII Chemistry Reader

Você também pode gostar