Professional Documents
Culture Documents
Hello everybody here are some few programs written in turbo c++ IDE As
shown in following
And the program is to find area and circumference as shown below:
After writing all the program check whether the program contains errors
or not by giving the command like alt+f9 and if there are no errors in the
program then execute the program by giving ctrl+f9 and if the program
has some input values to be entered then give the input and to move on to
main program then type \r i.e to return to main program thats it.
Now reverse of a number:
Output displayed:
In the above program if(n<0); plays an important role in order to get the
desired output so make sure that it is given correct in the main program
screen a/c to the specified condition i.e if(b!=0) which means if the
variable a acting as numerator and b is denominator then division is
possible if and only if the denominator number is other than zero.
Program: swapping of two numbers
Output displayed:
This program just swaps or exchanges the values and displays it on the
monitor screen for ex: x=25; y=12; then after executing the program with
this input values output will be x=12; y=25 thats it. Logics must be
written correct in order to obtain the correct result.
Program: finding Biggest among two numbers
Output displayed:
Here is the output to find the biggest number between two numbers logics
must be correctly specified in order to get the correct result.
Ex: a=25; b=50
Then biggest number is 50 that should be displayed on the screen.