//To find the power of a number #include<stdio.h> #include<conio.h> int power(int a,int b); int main() { clrscr(); int a,b; printf("\nEnter the base:"); scanf("%d",&a); printf("\nEnter the power:"); scanf("%d",&b); printf("\nThe answer is:%d",power(a,b)); getch(); return 0; } int power(int x,int y) { int c; for(int i=1;i<=y;i++) c*=x; return c; }
c
for
power
1
-Wmaybe-uninitialized
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)