Saturday, March 6, 2010

program to find out simple interest.

#include
#include
void main()
{
clrscr() ;
int x ;
float interest, principal, rate, time ;
for (x= 4, x>=0, x - -)
{
cout<<"enter the principal, rate & time: "<<\n ;
cin>>principal >> rate>> time ;
simple interest = (principal * rate * time) / 100 ;
cout<<"principal = Rs. "<<<\n ;
cout<<"rate = "<<<"%"<<\n ;
cout<<"time = "<
cout<<"simple interest = Rs. "<<<\n;
}
getch() ;
}

Saturday, February 13, 2010

basic defination & its uses.

#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. 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.

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();
}