fork download
  1. #include<stdio.h>
  2.  
  3. int exponentiate(int bse, int xpnt)
  4. {
  5. int total = 1;
  6. int i;
  7. for (i = 0; i < xpnt; i++){
  8. total *= bse;
  9. }
  10. return total;
  11. }
  12.  
  13. main()
  14. {
  15. int i;
  16. for (i = 6; i < 20; i++){
  17. printf("%d\n", exponentiate(2, i));
  18. }
  19. }
Success #stdin #stdout 0s 9432KB
stdin
Standard input is empty
stdout
64
128
256
512
1024
2048
4096
8192
16384
32768
65536
131072
262144
524288