You are on page 1of 11

COPUTER SCIENCE

PROJECT

Prepared By:
RISHABH BABBAR
ISHAN MEHRA
SHUBH JAIN
ACKNOWLEDGEMENT

“There are times when silence speaks so much loudly


than words of praise to only as good as belittle a person,
whose words do not express, but only put a veneer over
true feelings which are gratitude at this point of time”.
We would like to express our sincere gratitude to our
COMPUTER SCIENCE (CS) teacher Ms. Divya Jyoti Ma’am
for her vital support, guidance and encouragement-
without which this project would have come forth.
We would also like to express our gratitude to our school
(S.L.S. D.A.V. PUBLIC SCHOOL, MAUSAM VIHAR, DELHI-
110051) staff members for their support during the aking
of this project.
ABOUT THE PROGRAM

THIS IS A USER DEFINED PROGRAM


WHICH CONTAINS THE FORMATION
ABOUT THE PHYICAL PROPERTIES OF
ATOM. THE PROGRAM IS DESIGNED TO
GIVE APPROPRIATE INFORMATION
ABOUT THE PHYSICAL PROTIES OF
FIRST TWENTY ELEMENTS OF THE
MODERN PERIODIC TABLE, WHICH
INCLUDES ATOMIC MASS ,NAME OF
ELEMENT, NUMBER OF PROTONS AND
ELECTRONS PRESENT IN A ATOM. THE
USER HAVE TO ENTER THE ATOMIC
NUMBER OF THE ELEMENT AND CAN
OBTAIN APROPRIATE RESULTS
(ACCORDING TO THE PROGRAMMING
OF THE PROGRAM). THE PROGRAM IS
COMPOSED OF USING THE SWITCH
CASE AND FUCTIONS KNOWLEDGE.

PROGRAM CODING

/*program to give atomic mass and name of the element when user enter

the atomic number of the element.*/

#include<iostream.h>

#include<conio.h>

#include<dos.h>

void add(int x,int y)

int z=x+y;

cout<<"\nAtomic Mass is:"<<z;

}
void main()

clrscr();

unsigned int at_no;

cout<<"\nWELCOME TO THE WORLD OF COMPUTER";

delay(800);

cout<<"\nEnter the Atomic Number of element(1-20):";

cin>>at_no;

switch(at_no)

case 1:cout<<"\nEntered atomic no. is:"<<at_no;

cout<<"\nName of the element is:HYDROGEN";

cout<<"\nNo. of protons:"<<1;

cout<<"\nNo. of neutrons:"<<0;

add(1,0);break;

case 2:cout<<"\nEntered atomic no. is:"<<at_no;

cout<<"\nName of the element is:HELIUM";

cout<<"\nNo. of protons:"<<2;

cout<<"\nNo. of neutrons:"<<2;

add(2,2);break;

case 3:cout<<"\nEntered atomic no. is:"<<at_no;

cout<<"\nName of the element is:LITHIUM";


cout<<"\nNo. of protons:"<<3;

cout<<"\nNo. of neutrons:"<<4;

add(3,4);break;

case 4:cout<<"\nEntered atomic no. is:"<<at_no;

cout<<"\nName of the element is:BERYLLIUM";

cout<<"\nNo. of protons:"<<4;

cout<<"\nNo. of neutrons:"<<5;

add(4,5);break;

case 5:cout<<"\nEntered atomic no. is:"<<at_no;

cout<<"\nName of the element is:BORON";

cout<<"\nNo. of protons

add(5,6);break;

case 6:cout<<"\nEntered atomic no. is:"<<at_no;

cout<<"\nName of the element is:CARBON";

cout<<"\nNo. of protons:"<<6;

cout<<"\nNo. of neutrons:"<<6;

add(6,6);break;

case 7:cout<<"\nEntered atomic no. is:"<<at_no;

cout<<"\nName of the element is:NITROGEN";

cout<<"\nNo. of protons:"<<7;

cout<<"\nNo. of neutrons:"<<7;

add(7,7);break;
case 8:cout<<"\nEntered atomic no. is:"<<at_no;

cout<<"\nName of the element is:OXYGEN";

cout<<"\nNo. of protons:"<<8;

cout<<"\nNo. of neutrons:"<<8;

add(8,8);break;

case 9:cout<<"\nEntered atomic no. is:"<<at_no;

cout<<"\nName of the element is:FLOURINE";

cout<<"\nNo. of protons:"<<9;

cout<<"\nNo. of neutrons:"<<10;

add(9,10);break;

case 10:cout<<"\nEntered atomic no. is:"<<at_no;

cout<<"\nName of the element is:NEON";

cout<<"\nNo. of protons:"<<10;

cout<<"\nNo. of neutrons:"<<10;

add(10,10);break;

case 11:cout<<"\nEntered atomic no. is:"<<at_no;

cout<<"\nName of the element is:SODIUM";

cout<<"\nNo. of protons:"<<11;

cout<<"\nNo. of neutrons:"<<12;

add(11,12);break;

case 12:cout<<"\nEntered atomic no. is:"<<at_no;

cout<<"\nName of the element is:MAGNESIUM";


cout<<"\nNo. of protons:"<<12;

cout<<"\nNo. of neutrons:"<<12;

add(12,12);break;

case 13:cout<<"\nEntered atomic no. is:"<<at_no;

cout<<"\nName of the element is:ALUMINIUM";

cout<<"\nNo. of protons:"<<13;

cout<<"\nNo. of neutrons:"<<14;

add(13,14);break;

case 14:cout<<"\nEntered atomic no. is:"<<at_no;

cout<<"\nName of the element is:SILICON";

cout<<"\nNo. of protons:"<<14;

cout<<"\nNo. of neutrons:"<<14;

add(14,14);break;

case 15:cout<<"\nEntered atomic no. is:"<<at_no;

cout<<"\nName of the element is:PHOSHORUS";

cout<<"\nNo. of protons:"<<15;

cout<<"\nNo. of neutrons:"<<16;

add(15,16);break;

case 16:cout<<"\nEntered atomic no. is:"<<at_no;

cout<<"\nName of the element is:SULPHUR";

cout<<"\nNo. of protons:"<<16;

cout<<"\nNo. of neutrons:"<<16;
add(16,16);break;

case 17:cout<<"\nEntered atomic no. is:"<<at_no;

cout<<"\nName of the element is:CHLORINE";

cout<<"\nNo. of protons:"<<17;

cout<<"\nNo. of neutrons:"<<18;

add(17,18);break;

case 18:cout<<"\nEntered atomic no. is:"<<at_no;

cout<<"\nName of the element is:ARGON";

cout<<"\nNo. of protons:"<<18;

cout<<"\nNo. of neutrons:"<<22;

add(18,22);break;

case 19:cout<<"\nEntered atomic no. is:"<<at_no;

cout<<"\nName of the element is:POTASIUM";

cout<<"\nNo. of protons:"<<19;

cout<<"\nNo. of neutrons:"<<20;

add(19,20);break;

case 20:cout<<"\nEntered atomic no. is:"<<at_no;

cout<<"\nName of the element with atomic no. is:CALCIUM";

cout<<"\nNo. of protons:"<<20;

cout<<"\nNo. of neutrons:"<<20;

add(20,20);break;

default:cout<<"YOU HAD ENTERED A INVALID ATOMIC NO.(NOT BETWEEN "


<<"1 TO 20)";

getch();

OUTPUT

You might also like