#include:- It is a preprocessor complier or directive.
iostream:- It use for input & output stream.
.h:- It is header file. A file containing CPP tokens to set the particular model resolution and configuration named with a ".h" suffix {example= include.h}.
conio:- It used for console input & output.
complier:- A program that translates a high-level language, such as BASIC, into machine language. A compiler is a computer program (or set of programs) that transforms source code written in a computer language(thesource language) into another computer language (the target language, often having a binary form known as object code). The most common reason for wanting to transform source code is to create an executable program.
main():- The main program start, with keyword main(), each program must have a main() function.
curly Braces{}:- All the coding is include in the body of the main program in the curly braces{} & } end the coding for the program.
getch():- getch is used for get the result or output.
Saturday, February 13, 2010
largest number from the given number program
#include
#include
void main()
{
int a,b,c,large;
cout<<"enter three numbers:";
cin>>a>>b>>c;
large=a>b?(a>c?a:c):(b>c?b:c);
cout<<"the largest of three number is"<<<"/n";
getch();
}
#include
void main()
{
int a,b,c,large;
cout<<"enter three numbers:";
cin>>a>>b>>c;
large=a>b?(a>c?a:c):(b>c?b:c);
cout<<"the largest of three number is"<
getch();
}
Friday, February 5, 2010
Practice problem 2
Ques) :- Find the potential difference between points F & C of the electric circuit shown in figure.
Solution :- V(F) – V(C) = - 4/3 volt.
Here negative sign shows that V(F) < V(C).
[ hints :- To find potential difference between any two points of a circuit you have to reach from one point to other via any path of the circuit.
For sloving easily Always choose a path which have least number of resistors preferably a path which has no resistance. ]
Capacitance of a spherical conductor.
v Capacitance of a spherical conductor.
When a +ve charge q is given to a spherical conductor of radius R, the potential on it is,
From the above expression we find that,
Thus, capacitance of the spherical conductor is,
(1).
Which we have directly stated that C depends on the dimensions of the conductor.
If two conductors have radii R 1 & R 2 then,
(2).Earth is also a spherical conductor of radius
C = 711 microF [ F= farad].
Subscribe to:
Posts (Atom)


