Advertisement
Guest User

CALCULAR EXPONENCIAL

a guest
Aug 19th, 2019
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.37 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <math.h>
  3. int main()
  4. {
  5.     int q;
  6.     int o=1;
  7.     int i=0;
  8.     int p;
  9.     int r;
  10.     printf("Qual o valor da base?");
  11.     scanf("%d",&p);
  12.     printf("Até qual potência você deseja calcular?");
  13.     scanf("%d",&q);
  14.  
  15.  
  16.     while (i<q)
  17.     {
  18.         r = pow(p,o);
  19.         printf("%d\n",r);
  20.         i++;
  21.         o++;
  22.     }
  23.    
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement