Welcome to my blog this is test

28 June 2012

write a C program to determine the value of x to the power y


//code//
#include
#include
#include
 void main()
  {
   int x,y,p;
   clrscr();
   printf("\n Enter the value of x and y : ");
    scanf("%d%d",&x,&y);
      p=pow(x,y);
     printf("\n The value of %d to the power %d is = %d",x,y,p);
    getch();
  }

/*Output :
Enter the value of x and y : 4 3
The value of 4 to the power 3 is = 64

No comments:

Post a Comment