[問題] 請問一題計摡
Q:Suppose you want to interchange the values stored in cell number 2 and number
3, What is wrong with the following steps:
(Design a correct procedure after correcting it)
step1.move the contents of cell number 1 to cell number 2
step.2 move the contents of cell number 2 to cell number 1
我看了解答它是說這兩個步驟會導致兩個cell都會同樣包含原本cell number 2
的內容 原因是?
正確的步驟好像是把cell number2 內容先移到另一個cell number 1
然後再把 number3移到number2 最後再把number1移到number3
請問為什麼要這樣做?
謝謝指教
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 218.164.100.133
※ 編輯: minikitty 來自: 218.164.100.133 (06/29 17:52)
→
06/29 18:01, , 1F
06/29 18:01, 1F
→
06/29 18:02, , 2F
06/29 18:02, 2F
→
06/29 18:10, , 3F
06/29 18:10, 3F
→
06/30 01:18, , 4F
06/30 01:18, 4F