fork download
  1. #include <stdio.h>
  2. int power(int x, int y)
  3. {
  4. int i, j=x;
  5. for(i=1;i>y;i++)
  6. {
  7. x=x*j;
  8. }
  9. return x;
  10. }
  11.  
  12. int main(void) {
  13. printf("%d",power(3,2));
  14. return 0;
  15. }
  16.  
Success #stdin #stdout 0s 5328KB
stdin
Standard input is empty
stdout
3