![]() |
Milestone 6: Basic Data Structures
|
You may refer to the textbook. You may not use: (1) Handphones (2) Internet (3) Discussion or Talking. 這個里程碑是開放的。 您不得使用:(1) 手機 (2) 網路 (3) 討論或交談。 The test is 30 minutes.
Your Name | Your ID |
---|---|
Mentor Name | Mentor ID |
Instructions 说明
| Task: Write a function to reverse the elements of an array. Your program should prompt the user to enter the elements of an array. (b) Call a function to reverse the order of the elements and place them in a new array (c) Print the result (d) Demonstrate the function working for an array of size 8. 任務:寫一個函數來反轉數組的元素。(a)應提示使用者輸入數組的元素。 (b)呼叫函數來反轉元素的順序並將它們放入新數組中(c)列印結果(d) 示範適用於8個元素的陣列的函數 |
Screen shot (user input is bold)
c:\sdba>reverse Input array to be reversed>1,2,3,4,5,6,7,8 Output array is: 8,7,6,5,4,3,2,1 |
⇒ Draw your UML here. 在这里绘制你的通用建模语言活动图
0
1
2
3
4