Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- #include<stdlib.h>
- #include<math.h>
- int main(){
- int i,base,exp,pot=1;
- printf("Digite a base:");
- scanf("%d",&base);
- printf("\nAgora,digite o expoente:");
- scanf("%d",&exp);
- for(i=0;i<=exp;i++){
- pot=pow(base,exp);
- }
- printf("\n\n%d elevado a %d sera %d\n",base,exp,pot);
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment