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
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

#I have assignment c with unix thread multiplication program ..

write a program to find area of curve y=f(x) between x and x=b,integrate between the limits a and b using c     #include float start_point, /* GL

A: This will turn o_ "name mangling" for func so that one can connect to code compiled by a C compiler.

redirection in c++


Default Value Functions,  When declaring a function we can specify a default value for each parameter. This value will be used if that parameter is left blank when calling to the f

My project is compiling but the equation entered is not working

// Basic pointer code #include "stdafx.h" #include iostream using namespace std; int _tmain(int argc, _TCHAR* argv[]) {             int FirstNumber, SecondNumber;

When you are designing a generic class to have or otherwise manage objects of other types, when the format and behavior of those other types are unimportant to their containment or