fork download
  1. #include <stdio.h>
  2.  
  3. double power(double x,int n);
  4.  
  5. int main(void) {
  6. double x;
  7. int n,a;
  8. a = 1;
  9.  
  10. printf("実数を入力してください\n");
  11. scanf("%lf",&x);
  12. scanf("%d",&n);
  13.  
  14. return 0;
  15. }
  16.  
  17. double power(double x,int n){
  18. int i;
  19. double ans;
  20.  
  21. for(i = 1;i <= n;i ++){
  22. ans *= x;
  23. }
  24.  
  25. return(ans);
  26. }
Success #stdin #stdout 0s 5280KB
stdin
5.0
3
stdout
実数を入力してください