Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <math.h>
- int main()
- {
- int q;
- int o=1;
- int i=0;
- int p;
- int r;
- printf("Qual o valor da base?");
- scanf("%d",&p);
- printf("Até qual potência você deseja calcular?");scanf("%d",&q);
- while (i<q)
- {
- r = pow(p,o);
- printf("%d\n",r);
- i++;
- o++;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement