#include<conio.h>
#include<stdio.h>
#include<fstream.h>
#include<graphics.h>
#include<dos.h>
#include<time.h>
#include<STDLIB.H>    // FOR EXIT
#define ESC 0x1b            /* Define the escape key    */



void Pause(void)
{


int c;


c = getch();                /* Read a character from kbd    */


if( ESC == c ){         /* Does user wish to leave? */


exit( 1 );              /* Return to OS         */
}


if( 0 == c ){           /* Did use hit a non-ASCII key? */
c = getch();            /* Read scan code for keyboard  */
}
}
void graphic_screen()
{
int driver,mode;
driver=DETECT;intigraph(&driver,&mode,"");
setbkcolor(0);
setcolor(2);
settextstyle(2,2,2);
closegraph();
}
void main()
{
graphic_screen();
clrscr();
textbackground(0);    // set's backgroundcolor to black
textcolor(GREEN);    // set's fontcolor
time_t t;           // glabally declared in time.h header file
time(&t);
cout<<"\t\t\t\t\t\t\t"<<ctime(&t);    // prints the surrent date and time


//settextstyle(1,HORIZ_DIR,2);


//DEFAULT font
//TRIPLEX font
//SMALL font
//SANS SERIF font
//GOTHIC font



//CLASS 10
// PHYSICS


//LIGHT


ofstream ob1("10phlight");
ob1<<"\n \t\t   Light Reflection and Refraction \n\n";
ob1<<"  Light seems to travel in straight lines.";
ob1<<"    Mirrors and lenses form images of objects, Images can be either real or virtual depending on the position of the object.";
ob1<<"    The reflecting surfaces obey laws of reflection. Refracting surfaces obey laws of refraction.";
ob1<<"    Mirror formula (1/u + 1/v = 1/f) gives the relationship between object distance (u), image distance (v) and focal length (f) of a spherical mirror.";
ob1<<"    The focal length of a spherical mirror is equal to half is radius of curvature.";
ob1<<"    The magnification produced by a spherical mirror is the ratio of the height of the image to the height of the object.";
ob1<<"    Refractive index of a transparent medium is the ratio of the speed of light in vacuum to that in the medium.";
ob1<<"    Power of a lens is the reciprocal of its focal length. SI unit of the power of a lens is Dioptre.";
ob1.close();


ifstream ob2("10phlight");
cout<<"\n\t\t \t  LIGHT REFLECTION AND REFRACTION \n\n";
cout<<"\n 1.Light seems to travel in straight lines.\n";
cout<<"\n 2.Mirrors and lenses form images of objects, Images can be either\n   real or virtual depending on the position of the object.\n";
cout<<"\n 3.The reflecting surfaces obey laws of reflection. Refracting surfaces\n   obey laws of refraction.\n";
cout<<"\n 4.Mirror formula (1/u + 1/v = 1/f) gives the relationship between\n   object distance (u), image distance (v) and focal length (f) of\n   a spherical mirror.\n";
cout<<"\n 5.The focal length of a spherical mirror is equal to half is radius\n   of curvature.\n";
cout<<"\n 6.The magnification produced by a spherical mirror is the ratio of\n   the height of the image to the height of the object.\n";
cout<<"\n 7.Refractive index of a transparent medium is the ratio of the speed\n   of light in vacuum to that in the medium.\n";
cout<<"\n 8.Power of a lens is the reciprocal of its focal length. SI unit of\n   the power of a lens is Dioptre.\n\n\n";
ob2.close();
Pause();
clrscr();
// HUMAN - EYE
ofstream ob3("10pheye");
ob3<<"\n \t\t   THE HUMAN-EYE AND THE COLOURFUL WORLD \n\n";
ob3<<"The ability of the eye to focus both near and distant objects, by adjusting its focal length, is called accommodation of the eye.";
ob3<<"The smallest distance, at which the eye can see objects clearly without strain, is called the near point of the eye or least distinct vision. For a young adult with normal vision, it’s about 25 cm.";
ob3<<"The splitting of white light into its component colors is called dispersion.";
ob3<<"Scattering of light causes the blue color of the sky and the reddening of the sun at sunrise and sunset.";
ob3.close();


ifstream ob4("10pheye");
cout<<"\t\t\t\t\t\t\t"<<ctime(&t);    // prints the surrent date and time
cout<<"\n \t\t   THE HUMAN-EYE AND THE COLOURFUL WORLD \n\n";
cout<<"\n1.The ability of the eye to focus both near and distant objects,\n  by  adjusting its focal length, is called accommodation of the\n  eye.\n";
cout<<"\n2.The smallest distance, at which the eye can see objects clearly\n  without strain, is called the near point of the eye or least\n  distinct vision. For  a young adult with normal vision, its about\n  25 cm.\n";
cout<<"\n3.The splitting of white light into its component colors is called\n  dispersion.\n";
cout<<"\n4.Scattering of light causes the blue color of the sky and the\n  reddening of the sun at sunrise and sunset.\n\n\n";
ob4.close();
Pause(); clrscr();
// ELECTRICITY
ofstream ob5("10phele");
ob5<<"A stream of electrons moving through a conductor constitutes an electric current. Conventionally, the direction of current is taken opposite to the direction of flow of electrons.\n";
ob5<<"To set the electrons in motion in an electric circuit, we se a cell or a battery. A cell generates a potential difference across its terminals. It's measured in volts (V).\n";
ob5<< "The SI unit of electric current is Ampere.\n";
ob5<<"Resistance is the property that resists the flow of electrons in a conductor. It controls the magnitude of the current. The SI unit of Resistance is Ohm.\n";
ob5<<"Ohm's Law-The Potential difference across to the ends of a resistor is directly proportional to the current flowing through it, provided its temperature remains the same.\n";
ob5<<"Resistance of a conductor depends directly on its length, inversely on its area of cross section and also on the material of the conductor.\n";
ob5<<"The equivalent resistance of several resistors in series is equal to the sun of their individual resistances.\n";
ob5<<"A set of Resistors connected in parallel=1/R1 + 1/R2 + ….1/Rn\n";
ob5<<"The unit of Power is Watt. One watt of power is consumed when one Ampere of current flows at a potential difference of 1 Volt.\n";
ob5<<"The electric energy dissipated in a resistor is given by W=V x I x t\n";
ob5.close();


ifstream ob6("10phele");
cout<<"\t\t\t\t\t\t\t"<<ctime(&t);    // prints the surrent date and time
cout<<"\n \t\t \t\t ELECTRICITY \n\n";
cout<<"\n1.A stream of electrons moving through a conductor constitutes an\n  electric current. Conventionally, the direction of current is taken\n  opposite to the direction of flow of electrons.\n";
cout<<"\n2.To set the electrons in motion in an electric circuit, we set a\n  cell or a battery. A cell generates a potential difference across\n  its terminals. It's measured in volts (V).\n";
cout<<"\n3.The SI unit of electric current is Ampere.\n";
cout<<"\n4.Resistance is the property that resists the flow of electrons in a\n  conductor. It controls the magnitude of the current. The SI unit of\n  Resistance is Ohm.\n";
cout<<"\n5.Ohm's Law-The Potential difference across to the ends of a resistor\n  is directly proportional to the current flowing through it, provided\n  its temperature remains the same.\n";
cout<<"\n6.Resistance of a conductor depends directly on its length, inversely\n  on its area of cross section and also on the material of the conductor.\n";
cout<<"\n7.The equivalent resistance of several resistors in series is equal to\n  the sum of their individual resistances.\n";
cout<<"\n8.A set of Resistors connected in parallel=1/R1 + 1/R2+........+1/Rn\n";
cout<<"\n9.The unit of Power is Watt. One watt of power is consumed when one\n  Ampere of current flows at a potential difference of 1 Volt.\n";
cout<<"\n10.The electric energy dissipated in a resistor is given by W = V x I x t\n\n\n";
ob6.close();
Pause();clrscr();
//CHEMISTRY


// ACID , BASE , SALTS
ofstream ob7("10chac");
ob7<<"Acid-Base indicators are dyes or mixture of dyes used to indicate the presence of acids and bases.";
ob7<<"Acidic nature of a substance is due to the formation of H+ (aqueous) ions in solution. Formation of OH-(aqueous) ions in solution is responsible for basic nature of a substance.";
ob7<<"When an acid reacts with a metal, along with evolution of hydrogen gas, a salt is also formed.";
ob7<<"When a base reacts with a metal, along with the evolution of hydrogen gas, a salt is formed in which a negative ion is composed of metal and oxygen.";
ob7<<"When an acid reacts with a metal carbonate or a metal hydrogen carbonate, it gives the corresponding salt, carbon dioxide and water.";
ob7<<"Acidic and Basic solutions in water conduct electricity because they produce hydrogen and hydroxide ions respectively.";
ob7<<"The strength of an acid or an alkali can be tested by using a scale called pH scale which ranges from 1 to 14 giving a measure of the hydrogen concentration in the solution.";
ob7<<"A neutral solution has a pH of exactly 7 while an acidic solution has a pH of less than 7 and a basic solution have a pH of greater than 7.";
ob7<<"Mixing concentrated acids or bases with water results in a highly exothermic reaction.";
ob7<<"Water of Crystallization is the number of water molecules chemically attached to each formula unit of a salt in its crystalline form.";
ob7.close();


ifstream ob8("10chac");cout<<"\t\t\t\t\t\t\t"<<ctime(&t);    // prints the surrent date and time
cout<<"\n \t\t \t  ACID , BASES AND SALTS\n\n";
cout<<"\n1.Acid-Base indicators are dyes or mixture of dyes used to indicate\n  the presence of acids and bases.\n";
cout<<"\n2.Acidic nature of a substance is due to the formation of H+ (aqueous)\n  ions in solution. Formation of OH-(aqueous) ions in solution is\n  responsible for basic nature of a substance.\n";
cout<<"\n3.When an acid reacts with a metal, along with evolution of hydrogen\n  gas, a salt is also formed.\n";
cout<<"\n4.When a base reacts with a metal, along with the evolution of hydrogen\n  gas, a salt is formed in which a negative ion is composed of metal and\n  oxygen.\n";
cout<<"\n5.When an acid reacts with a metal carbonate or a metal hydrogen\n  carbonate, it gives the corresponding salt, carbon dioxide and\n  water.\n";
cout<<"\n6.Acidic and Basic solutions in water conduct electricity because\n  they produce hydrogen and hydroxide ions respectively.\n";
cout<<"\n7.The strength of an acid or an alkali can be tested by using a\n  scale called pH scale which ranges from 1 to 14 giving a measure\n  of the hydrogen concentration in the solution.\n";
cout<<"\n8.A neutral solution has a pH of exactly 7 while an acidic solution\n  has a pH of less than 7 and a basic solution have a pH of greater\n  than 7.\n";
cout<<"\n9.Mixing concentrated acids or bases with water results in a highly\n  exothermic reaction.\n";
cout<<"\n10.Water of Crystallization is the number of water molecules chemically\n  attached to each formula unit of a salt in its crystalline form.\n\n\n";
ob8.close();
Pause();clrscr();


//METALS AND NON-METALS


ofstream ob9("10chme");
ob9<<"Metals are lustrous, malleable, ductile and good conductors of heat and electricity. They are solids at room temperature except mercury which is a liquid.";
ob9<<"Metals can form positive ions by losing electrons to non metals.";
ob9<<"Metals combine with oxygen to form basic oxides. Aluminium oxides and Zinc oxides show the properties of both basic and acidic oxides. These oxides are known as amphoteric oxides.";
ob9<<"A list of common metal arranged in the order of their decreasing reactivity makes up the activity series.";
ob9<<"Metals above hydrogen in the Activity series can displace hydrogen from dilute acids.";
ob9<<"A more reactive metal displaces a less reactive metal from its salt solution.";
ob9<<"Metals occur in nature as free elements or in the form of their compounds.";
ob9<<"The extraction of metals from their ores and then refining them for use is called Metallurgy.";
ob9<<"An alloy is a homogenous mixture of two or more metals, or a metal and non metal.";
ob9<<"The surfaces of some metals, such as iron, get corroded when they are exposed to moisture for a long period of time. This phenomenon is called corrosion.";
ob9<<"Non metals have properties opposite to that of metals. They are neither malleable nor ductile. They are bad conductors of heat and electricity, except for graphite, which conducts electricity due to the presence of a free valance electron.";
ob9<<"Non metals form negatively charged ions by gaining electrons when they react with metals.";
ob9<<"Non metals form oxides which are acidic or neutral.";
ob9<<"Non metals Do not displace hydrogen from dilute acids. They react with hydrogen to form hydrides.";
ob9.close();


ifstream ob10("10chme");cout<<"\t\t\t\t\t\t\t"<<ctime(&t);    // prints the surrent date and time
cout<<"\n\t\t \t METALS AND NON-METALS \n";
cout<<"\n1.Metals are lustrous, malleable, ductile and good conductors of heat\n  and electricity. They are solids at room temperature except mercury\n  which is a liquid.\n";
cout<<"\n2.Metals can form positive ions by losing electrons to non metals.\n";
cout<<"\n3.Metals combine with oxygen to form basic oxides. Aluminium oxides\n  and Zinc oxides show the properties of both basic and acidic oxides.\n  These oxides are known as amphoteric oxides.\n";
cout<<"\n4.A list of common metal arranged in the order of their decreasing\n  reactivity makes up the activity series.\n";
cout<<"\n5.Metals above hydrogen in the Activity series can displace hydrogen\n  from dilute acids.\n";
cout<<"\n6.A more reactive metal displaces a less reactive metal from its\n  salt solution.\n";
cout<<"\n7.Metals occur in nature as free elements or in the form of their\n  compounds.\n";
cout<<"\n8.The extraction of metals from their ores and then refining them\n  for use is called Metallurgy.\n";
cout<<"\n9.An alloy is a homogenous mixture of two or more metals, or a\n  metal and non metal.\n";
cout<<"\n10.The surfaces of some metals, such as iron, get corroded when they\n  are exposed to moisture for a long period of time. This phenomenon\n  is called corrosion.\n";
cout<<"\n11.Non metals have properties opposite to that of metals. They are\n  neither malleable nor ductile. They are bad conductors of heat and\n  electricity, except for graphite, which conducts electricity due to\n  the presence of a free valance electron.\n";
cout<<"\n12.Non metals form negatively charged ions by gaining electrons when\n  they react with metals.\n";
cout<<"\n13.Non metals form oxides which are acidic or neutral.\n";
cout<<"\n14.Non metals Do not displace hydrogen from dilute acids. They react\n  with hydrogen to form hydrides.\n\n\n";
ob10.close();
Pause();clrscr();
//CLASS 9
//CHEMISTRY


//Matter in our Surroundings


ofstream ob11("9chma");
ob11<<"\nMatter around us exists in three states namely, Solids, Liquid and Gas.\n";
ob11<<"\nThe forces of attraction between particles are maximum in solids, intermediate in liquids and minimum in gases.\n";
ob11<<"\nThe Spaces in between constituent particles and kinetic energy in the particles are minimum in the case of solids, intermediate in liquids and maximum in gases.\n";
ob11<<"\nThe States of matter are inter-convertible. The states of matter can be changed by changing temperature or pressure.\n";
ob11<<"\nSublimation is the change of gaseous state directly to solid state without going to liquid state and vice versa.\n";
ob11<<"\nBoiling is a bulk phenomenon. Particles from the bulk (whole) of the liquid change into vapor state.\n";
ob11<<"\nEvaporation is a surface phenomenon. Particles from the surface gain enough energy to overcome the forces of attraction present in the liquid and change into the vapor state. The rate of evaporation depends upon surface area exposed to the atmosphere, the temperature, the humidity and the wind speed.\n";
ob11<<"\nEvaporation causes cooling.\n";
ob11<<"\nLatent heat of vaporization is the heat energy required to change one kilogram of liquid to gas at atmospheric pressure at its boiling point.\n";
ob11<<"\nLatent heat of Fusion is the amount of heat energy required to change one kilogram of solid into liquid at its melting point.\n";
ob11.close();


ifstream ob12("9chma");cout<<"\t\t\t\t\t\t\t"<<ctime(&t);    // prints the surrent date and time
cout<<"\n\t\t \t MATTER IN OUR SURR0UNDING \n";
cout<<"\n1.Matter around us exists in three states namely, Solids, Liquid and\n  Gas.\n";
cout<<"\n2.The forces of attraction between particles are maximum in solids,\n  intermediate in liquids and minimum in gases.\n";
cout<<"\n3.The Spaces in between constituent particles and kinetic energy in\n  the particles are minimum in the case of solids, intermediate in\n  liquids and maximum in gases.\n";
cout<<"\n4.The States of matter are inter-convertible. The states of matter\n  can be changed by changing temperature or pressure.\n";
cout<<"\n5.Sublimation is the change of gaseous state directly to solid state\n  without going to liquid state and vice versa.\n";
cout<<"\n6.Boiling is a bulk phenomenon. Particles from the bulk (whole) of the\n  liquid change into vapor state.\n";
cout<<"\n7.Evaporation is a surface phenomenon. Particles from the surface\n  gain enough energy to overcome the forces of attraction present\n  in the liquid and change into the vapor state. The rate of evaporation\n  depends upon surface area exposed to the atmosphere, the temperature,\n  the humidity and the wind speed.\n";
cout<<"\n8.Evaporation causes cooling.\n";
cout<<"\n9.Latent heat of vaporization is the heat energy required to change\n  one kilogram of liquid to gas at atmospheric pressure at its boiling\n  point.\n";
cout<<"\n10.Latent heat of Fusion is the amount of heat energy required to\n  change one kilogram of solid into liquid at its melting point.\n\n\n";
ob12.close();
Pause();clrscr();


// ATOMS AND MOLECULES


ofstream ob13("9chat");
ob13<<"\n\t\t \t ATOMS AND MOLECULES \n";
ob13<<"\n1.During a chemical reaction the sum of the masses of reactants and products remain unchanged. This is known as law of conservation of mass.\n";
ob13<<"\n2.In a pure chemical compound, the elements are always present in a definite proportion by mass. This is known as Law of Definite Proportions.\n";
ob13<<"\n3.An atom is the smallest particle of the element that can exist independently and can retain all its chemical properties.\n";
ob13<<"\n4.A molecule is the smallest particle of an element or compound capable of independent existence under ordinary conditions. It shows all the properties of the substance.\n";
ob13<<"\n5.Clusters of atoms attacked as an ion are called polyatomic ions. They carry a fixed charge on them.\n";
ob13<<"\n6.The chemical formula of a molecular compound is determined by the valency of each element.\n";
ob13<<"\n7.In Ionic compounds the charge on each ion is used to determine the chemical formula of the compound.\n";
ob13<<"\n8.The mole is the amount of substance that contains the same amount of particles (atoms/ ions/ molecules etc.) as there are atoms in exactly 12 gm of C-12.\n";
ob13<<"\n9.Mass of one molecule of substance is called the molar mass.\n";
ob13.close();


ifstream ob14("9chat");  cout<<"\t\t\t\t\t\t\t"<<ctime(&t);    // prints the surrent date and time
cout<<"\n\t\t \t ATOMS AND MOLECULES \n";
cout<<"\n1.During a chemical reaction the sum of the masses of reactants and\n  products remain unchanged. This is known as law of conservation of\n  mass.\n";
cout<<"\n2.In a pure chemical compound, the elements are always present in a\n  definite proportion by mass. This is known as Law of Definite\n  Proportions.\n";
cout<<"\n3.An atom is the smallest particle of the element that can exist\n  independently and can retain all its chemical properties.\n";
cout<<"\n4.A molecule is the smallest particle of an element or compound\n  capable of independent existence under ordinary conditions. It\n  shows all the properties of the substance.\n";
cout<<"\n5.Clusters of atoms attacked as an ion are called polyatomic ions.\n  They carry a fixed charge on them.\n";
cout<<"\n6.The chemical formula of a molecular compound is determined by the\n  valency of each element.\n";
cout<<"\n7.In Ionic compounds the charge on each ion is used to determine the\n  chemical formula of the compound.\n";
cout<<"\n8.The mole is the amount of substance that contains the same amount\n  of particles (atoms/ ions/ molecules etc.) as there are atoms in\n  exactly 12 gm of C-12.\n";
cout<<"\n9.Mass of one molecule of substance is called the molar mass.\n\n\n";
ob14.close();
Pause();clrscr();
//STRUCTURE OF ATOM


ofstream ob15("9chst");
ob15<<"\n1.Rutherford's alpha- particle scattering experiment led to the discovery of atomic nucleus.\n";
ob15<<"\n2.Rutherford's model of the atom proposed that a very tiny nucleus is present inside the atom and electrons revolve around this nucleus. The stability of the atom couldn’t be explained by this model.\n";
ob15<<"\n3.Neil Bohr's model of the atom was more successful. He proposed that electrons are distributed in different shells with discrete energy around the nucleus. If the atomic shells are complete, then the atom will be stable and less reactive.\n";
ob15<<"\n4.Chadwick discovered the presence of neutrons. While electrons are negatively charged and protons positively charged, neutrons carry no charge. The mass of an electron is about 1/2000 times that of a neutron. The mass of a proton and neutron are taken as 1 unit each.\n";
ob15<<"\n5.Valency is the combining capacity of an atom.\n";
ob15<<"\n6.The atomic of a number of an element is the same as the number of protons in the nucleus of its atom.\n";
ob15<<"\n7.The mass number of an atom is equal to the number of the nucleons in its nucleus.\n";
ob15<<"\n8.Isotopes are atoms of the same element, which have different mass numbers.\n";
ob15<<"\nIsobars are atoms having the same mass number but different atomic numbers.\n";
ob15<<"\n9.Elements are defined by the number of protons they possess.\n\n\n";
ob15.close();


ifstream ob16("9chst");cout<<"\t\t\t\t\t\t\t"<<ctime(&t);    // prints the surrent date and time
cout<<"\n\t\t \t STRUCTURE OF ATOM \n";
cout<<"\n1.Rutherford's alpha- particle scattering experiment led to the\n  discovery of atomic nucleus.\n";
cout<<"\n2.Rutherford's model of the atom proposed that a very tiny nucleus\n  is present inside the atom and electrons revolve around this nucleus.\n  The stability of the atom couldn’t be explained by this model.\n";
cout<<"\n3.Neil Bohr's model of the atom was more successful. He proposed that\n  electrons are distributed in different shells with discrete energy\n  around the nucleus. If the atomic shells are complete, then the atom\n  will be stable and less reactive.\n";
cout<<"\n4.Chadwick discovered the presence of neutrons. While electrons are\n  negatively charged and protons positively charged, neutrons carry\n  no charge. The mass of an electron is about 1/2000 times that of a\n  neutron. The mass of a proton and neutron are taken as 1 unit each.\n";
cout<<"\n5.Valency is the combining capacity of an atom.\n";
cout<<"\n6.The atomic of a number of an element is the same as the number of\n  protons in the nucleus of its atom.\n";
cout<<"\n7.The mass number of an atom is equal to the number of the nucleons\n  in its nucleus.\n";
cout<<"\n8.Isotopes are atoms of the same element, which have different mass\n  numbers.\n";
cout<<"\n9.Isobars are atoms having the same mass number but different atomic\n  numbers.\n";
cout<<"\n10.Elements are defined by the number of protons they possess.\n\n\n";
ob16.close();
Pause(); clrscr();


getch();
}

**Please help as soon as possible , as i have to complete the project

Recommended Answers

All 5 Replies

Please read the posting FAQ. Then try again AFTER cutting down this junk to a small testable sub-program that shows the same errors.

Also I am not answering post that put "Please help as soon as possible , as i have to complete the project". It is your assignment and your problem.

Finally, describe the problem AND things you have tried. (e.g. after googling your error message, you will see 500 suggestions (all the same)).

[While you are at it -- google about the physics you are describing so badly.]

commented: good advice :) +2
commented: Absolutely! +23

Write initgraph, not intigraph ;)
Don't waste a time and traffic on this funny "problems"...

Don't waste a time and traffic on this funny "problems"...

:) .. :)

Thanks for the solution but after correcting there is problem again but this time not 1 but 5 linker errors are there :

  • Undefined symbol closegraph() in module.
  • Undefined symbol settextstyle(int,int,int) in module.
  • Undefined symbol setcolor(int)in module.
  • Undefined symbol setbkcolor(int) in module.
  • Undefined symbol initgraph(int far* , int far* , char far*) in module.

Attach graphics library.
As far as I know, see
Options-->Linker-->Libraries-->[X]Graphics library...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.