17 lines
405 B
C
17 lines
405 B
C
#include<stdio.h>
|
|
|
|
int main(int argc, char *argv[]) {
|
|
int i;
|
|
int base;
|
|
int significative;
|
|
int result = 1;
|
|
printf("Enter base: ");
|
|
scanf("%d", &base);
|
|
printf("Enter significative: ");
|
|
scanf("%d", &significative);
|
|
for (i = 0; i < significative; i++) {
|
|
result *= base;
|
|
}
|
|
printf("%d powered by %d is %d \n", base, significative, result);
|
|
}
|