Showing posts with label function. Show all posts
Showing posts with label function. Show all posts

Thursday, March 27, 2014

A program to find the binary equivalent of the decimal number using function


I have written a program to find out the binary equivalent of the decimal number using function. Last time I had written the same program without using function. To have clear idea have a look for the source code and the output below:
The output of the above program is:

The main source code of the above output is:



Friday, March 7, 2014

To find whether the number is palindrome or not using function


In the previous page I have written the program to read the number until user enters 1 and to display the no of even and odd number entered by the user. Now lets do something new. In this page I am going to write the program to find whether the entered .number is palindrome. For this we should know what palindrome means. If the reversed number is equal to the enterd number then the number is said to be palindrome.For example: 343 is palindrome.
The main output of the following program is:
The main source code of the program is:


Thursday, March 6, 2014

To find the largest number in array using function


In the last program I have made the video of engineering drawing. Now lets move towards something new.
In this page I have written the program to find the largest number in an array using function. For this I have supposed the maximum number at first is of  zero position then I have used  the concept of replacing values. I have used argument with return values. For more idea have a look.

Saturday, March 1, 2014

To find the sum of the entered number using function only


In this page I have written the program to find the sum of the entered number using function but not recursion:
It can be done in this way:

Wednesday, February 26, 2014

To find the largest of the four numbers entered by using function


In this programme I have given  the concept to find the largest of the four numbers using function.
The main source code of the program is given below :

Tuesday, February 25, 2014

To find the area of circle using recursion function


In this programme I have given you the concept how to find the area of the circle using recursion function. I have used integer data types so the area of the circle will be displayed as the integer only.
If you use float as data type

Monday, February 24, 2014

To find factorial of the number using recursion


If we want to find the factorial of any num using recursion theorem&nbsp; this can be done in this way:<br />
for eg factorial of 5=5*4*3*2*1 <br />

Write a program to find x to the power of y using recursion


If we want to find x to the power of y using recursion then it can be done in this way.