Advertisement
hiroyukims

N^x

Nov 3rd, 2013
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.57 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <math.h>
  4.  
  5. int main(){
  6.          
  7.      float Base = 0;
  8.      int Expoente = 0;
  9.      int Contatador;
  10.      double Resultado = 0;
  11.      int Numero = 0;
  12.      
  13.          /*  Inicio do programa; by: Hiro Matsumoto */          
  14.           printf("Informe a BASE: ");
  15.           scanf("%f",&Base);
  16.           printf("%.0f de Expoente: ",Base);
  17.           scanf("%d",&Expoente);
  18.           Resultado = pow(Base,Expoente);
  19.           printf("%.0f^%d | Resultado = %g\n",Base,Expoente,Resultado);
  20.      
  21.      system("pause");
  22.      }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement