Reginaldojs

exercicio 54,lista 3

Jun 16th, 2012
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.42 KB | None | 0 0
  1. #include<stdio.h>
  2. #include<stdlib.h>
  3. #include<math.h>
  4. int main(){
  5.     int i,base,exp,pot=1;
  6.     printf("Digite a base:");
  7.     scanf("%d",&base);
  8.     printf("\nAgora,digite o expoente:");
  9.     scanf("%d",&exp);
  10.     for(i=0;i<=exp;i++){
  11.                         pot=pow(base,exp);
  12.                         }
  13.                         printf("\n\n%d elevado a %d sera %d\n",base,exp,pot);
  14.     system("pause");
  15.     return 0;
  16. }
Advertisement
Add Comment
Please, Sign In to add comment