c program to multiply exponent and base
#include <conio.h>
#include <stdio.h>
main()
{
int pow=1,x,y,i;
printf("Enter base & exponent:\t");
scanf("%d%d",&x,&y);
for(i=1;i<=y;i++)
{pow=pow*x;
}
printf("power :%d ",pow);
getch();
}
#include <conio.h>
#include <stdio.h>
main()
{
int pow=1,x,y,i;
printf("Enter base & exponent:\t");
scanf("%d%d",&x,&y);
for(i=1;i<=y;i++)
{pow=pow*x;
}
printf("power :%d ",pow);
getch();
}
Comments
Post a Comment