Skip to content

Instantly share code, notes, and snippets.

@shikajiro
Created July 18, 2013 14:54
Show Gist options
  • Save shikajiro/6029997 to your computer and use it in GitHub Desktop.
Save shikajiro/6029997 to your computer and use it in GitHub Desktop.
整数型の要素が100個ある配列を作ってください。 その配列に、0から99まで値を代入するfor文を書いてください。
public class HomeWork {
public static void main(String[] args) {
int[] numbers = new int[100];
for (int i = 0; i < numbers.length; i++) {
numbers[i] = i;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment