this program ask user input for base value and the limit value of the exponent
variabel explanation:
x is used for interval value
y is used for base value
z is used for exponent container
v is used for limit value
#include <stdio.h> #include <math.h>
int main() { int x,y; int z,v;
printf("\ninput value : ");scanf("%d", &y); printf("\ninput limit : ");scanf("%d", &v);
for(x=0;x<=v;x++){ z=pow(y,x); printf("\n%d exponent %d is %d",y ,x , z); }
return 0;
|
No comments:
Post a Comment