top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Help Me to write this function please

+1 vote
369 views

Implement the following functions recursively:

1- void power(int x, int y);// this function returns xy

2- void removeAll(linkedListType& obj); // this function removes all the linked list nodes. NOTE: this function is NOT a member function of the linkedListType class.

3- int seqSearch(int key); // this is a member function of the linkedListType class. It searches for the value key in the linked list. If the key is found, then its position is returned. Otherwise, -1 is returned. NOTE: in order to implement this function, you need to implement another private member function to send it the first pointer. Here is the prototype for the private member function:

int recSeqSearch(nodeType *p, int key);

posted Nov 17, 2013 by As M Ob

Looking for an answer?  Promote on:
Facebook Share Button Twitter Share Button LinkedIn Share Button
Aseel, these are three questions so please ask saperate questions so that people can give attention to it.

Also provide the proper title to each question, its important to attract people attetion by providing the proper title.
int power(int x, int y)
{
   if (y==1)
      return X;
   else
      return (x * power(x, y-1));
}

Similar Questions
–2 votes

Write java program that deal with different shapes. Shapes mean geometry shapes i.e. circle, rectangle, square, and triangle.

Circle: radius
Rectangle: height and width
Square: height
Triangle: base and height

All shapes have area but each shape has specific way for calculating the area:

Circle: ½ pie square *radius
Rectangle: height * width
Square: height * height
Triangle: ½ base *height

Finally, in the main program
1. Define all different kinds of shapes
2. Call Area method for all objects and print result .

...