我已經嘗試了很多組合,並在網上搜索了一些有用的東西,但不幸的是我沒有發現任何有用的東西。Java'編寫必要的代碼以「左旋」它們的值:'
這是我的作業。只有問題我不能回答69個問題。
問:
四個整數變量,POS1,POS2,POS3,POS4已宣佈和初始化。編寫必要的代碼以「左旋」它們的值:爲每個變量獲取連續變量的值,並且pos4獲得pos1的值。
的例子,我試過:
int tempP1 = pos1;
int tempP2 = pos2;
int tempP3 = pos3;
int tempP4 = pos4;
pos4 = tempP1;
pos3 = tempP2;
pos2 = tempP3;
pos1 = tempP4;
其顯示的內容我:
Remarks:
⇒ Your code had an error during execution
More Hints:
⇒ Are you sure you want to use: tempP1
⇒ Are you sure you want to use: tempP2
⇒ Are you sure you want to use: tempP3
Problems Detected:
⇒ pos1 has wrong value
⇒ pos3 has wrong value
謝謝你,像魅力一樣工作 – MOTIVECODEX