#include<stdio.h>
#include<conio.h>
#include<math.h>
int power(int a,int b);
void main()
{
int x,y;
clrscr();
printf("enter the x:");
scanf("%d",&x);
printf("enter the y:");
scanf("%d",&y);
power(x,y);
getch();
}
int power(int a,int b)
{
double c;
c=pow(a,b);
printf("\n ans=%lf",c);
return 0;
}
#include<conio.h>
#include<math.h>
int power(int a,int b);
void main()
{
int x,y;
clrscr();
printf("enter the x:");
scanf("%d",&x);
printf("enter the y:");
scanf("%d",&y);
power(x,y);
getch();
}
int power(int a,int b)
{
double c;
c=pow(a,b);
printf("\n ans=%lf",c);
return 0;
}
There is some mistake in your code.
ReplyDeleteSach mai kya
DeleteReally!
ReplyDeleteEnter the x 5
ReplyDeleteEnter the y 3
Answer 128