Posts

Showing posts with the label C Source

(i) Write a function to find the binary equivalent of a given decimal integer and display it.

Image

(f) Write a C function to evaluate the series L−+−+= !)7/()!5/()!3/()sin( 573 xxxxx

Image

) Write a recursive function to obtain the running sum of first 25 natural numbers.

Image

(d) A positive integer is entered through the keyboard, write a function to find the binary equivalent of this number using recursion.

Image

(g) Write a function that receives 5 integers and returns the sum, average and standard deviation of these numbers. Call this function from main( ) and print the results in main( ).

Image

(e) A positive integer is entered through the keyboard. Write a function to obtain the prime factors of this number?

Image

(d) Any year is entered through the keyboard. Write a function to determine whether the year is a leap year or not?

Image

(e) A positive integer is entered through the keyboard. Write a function to obtain the prime factors of this number?

Image

Sterick

Image

(b) Write a function power ( a, b ), to calculate the value of a raised to b.

Image

(k) Write a function to compute the greatest common divisor given by Euclid’s algorithm, exemplified for J = 1980, K = 1617 as follows:

Image

If the lengths of the sides of a triangle are denoted by a, b, and c, then area of triangle is given by

Image