Program to Find "a" to the power "b"
#include
//declaration of functionint pro(int , int);
void main(){int a ,b,c ;printf("enter the numbers :");scanf("%d%d" , &a , &b);c = pro(a,b);printf("%d to the power %d is %d",a,b,c);}
//definition of function which is finding a to the power bint pro(int x,int y){int c=1,d=1;if(y==0)printf("%d" ,1);if(x==0)printf("%d", 0);if((x!=0&&y!=0)){
0 comments:
Post a Comment