-
宣告一個裝 int 的 array ,有 5 格
-
格子依序填進 1 ~ 5
-
把每一個格子都 + 1
Created
November 28, 2016 14:56
-
-
Save RadianSmile/6207bb3df69c01b95eae83c5abb6e272 to your computer and use it in GitHub Desktop.
array 練習題
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
int []array = new int[5];
for(int i=0; i<5; i++){
array[i]= i+1;
}
for(int i=0; i<5; i++){
array[i]++;
}