✔ 最佳答案
圖片參考:
http://imgcld.yimg.com/8/n/HA04801976/o/701203120001813873448250.jpg
This should work.
2012-03-12 11:28:24 補充:
variable int num is the number of elements in the array. If you change the array, change this variable to reflect the correct number of elements in your array.
2012-03-13 08:51:52 補充:
Yes, there is a * before index. index is a pointer. It will be needed in the sum subroutine and the value of (*index) will be changed if needed.
2012-03-13 13:00:19 補充:
1. simply change all the double declaration to float.
2. instead of using index as a parameter to the function, use a global variable
3. shoot me an e-mail if there is any more information given/needed