C program to define power of a function, C/C++ Programming

C program to define power of a function:

Write a program to use power of a function.

void main()

{

int x,y,po=1,i,j;

clrscr();

 

printf("Give x,y\n");

scanf("%d %d",&x,&y);

 

  for(i=1;i<=y;i++)

   {

   po=po*x;

   }

 

printf("%d power %d is %d",x,y,po);

getch();

}

Posted Date: 10/19/2012 3:02:30 AM | Location : United States







Related Discussions:- C program to define power of a function, Assignment Help, Ask Question on C program to define power of a function, Get Answer, Expert's Help, C program to define power of a function Discussions

Write discussion on C program to define power of a function
Your posts are moderated
Related Questions
Normal 0 false false false EN-IN X-NONE X-NONE MicrosoftInternetExplorer4

Write a program to find the area under the curve y = f(x) between x = a and x = b, integrate y = f(x) between the limits of a and b. The area under a curve between two points can b

Damjibhai and Shamjibhai are two jeweler friends. They decide to play a simple game. The game comprises of removing the jewels for polishing, turn by turn. Once a jewel is removed

write a C program that can display the transpose form of a ciphertext matrix.

Write a Program to illustrate the Call by Reference? Here is an illustration: #include . int compute_sum(int *n); int main( void) { int n=3, sum; printf("%d\n",n); /

A: C++, unlike only about every other language with exceptions, is extremely accomodating while it comes to what you can throw. Actually, you can throw anything you akin to. That b

What is the difference among malloc/free and new/delete? A: Malloc/free do not know about destructors and constructors. New & delete create and destroy objects, whereas malloc &

Define the Double Data Type of c Language? The double is used to define BIG floating point numbers and it reserves twice the storage for the number. When the accuracy provided

Pointers are just numbers, representing addresses in memory. You can add to and subtract from pointers, for instance. It is pretty easy to make mistakes with pointer math, however,

Object Initialization An object of a derived class can be initialized to an object of a base class. If both the classes have similar data members, then no specific constructor