res=user_pow(base_num, index_num);// printf("거듭제곱은 %lf입니다.\n", res);// return0; }// ==================================================================이 윗부분까지는 이해를 했는데요 double user_pow(double base_num, int index_num) { int i; double res=1;
for(i=0; i<index_num; i++){ res=res*base_num; } return res; } 점선 아랫 부분에서 잘 모르겠는 점이 1. int에 왜 i로 정의하는건 그냥 임의로 정의하는거죠? 2. 마지막에 return 0;이 아니고 return res;인 이유가 반환값을 있게 해서 위에 메인함수로 돌아가게 만드는..(?) 게 맞는지요ㅜㅜ 3. 마지막으로 for문을 사용한 이유가 왜인지 조금 상세히 설명해주셨으면 좋겠습니다 엉엉 ㅜㅜ