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

Assignment Help:

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();

}


Related Discussions:- C program to define power of a function

Finnishing C++ Project, i havea a small C++ i need help with. should not be...

i havea a small C++ i need help with. should not be anything special for an experienced programmer

Area under the curve, Write a c++ program to find the area under the curve ...

Write a c++ 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 c

Program for construct a struct - user defined data type, Define a user-defi...

Define a user-defined data type (struct) called Car to represent a car in the context of a car dealership database. Car must have at least the following characteristics: Make Model

Do friends break encapsulation?, A: No. If they're utilized properly, they ...

A: No. If they're utilized properly, they increase encapsulation. You frequently require splitting a class in half while the two halves will have distinct numbers of instances o

Advantages of using pointers over arrays, Question : (a) Define a Poin...

Question : (a) Define a Pointer. Provide an example of an integer pointer variable. (b) Give advantages of using pointers over arrays. (c) Declare an integer pointer

How virtual functions can be implemented in c++?, Normal 0 fals...

Normal 0 false false false EN-US X-NONE X-NONE

C program for function of divider , C Program for FUNCTION OF DIVIDER ...

C Program for FUNCTION OF DIVIDER int gcd(int , int); void main() {           int m=0,n=0,k=0;           clrscr();           printf("ENTER THE FIRST DIGIT: ");

Program to open a file in c++, Program to Open a file in C++: int main...

Program to Open a file in C++: int main() {                  char ch;                  ifstream f1 ("OLDFILE.TXT");                  ofstream f2 ("NEWFILE.TXT");

Program to design list in c, Program to design list in c: Write a prog...

Program to design list in c: Write a program in c to insert the values in list void main() { int i=0; char a[20]; clrscr(); printf("Enter the line\n");

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd