Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* ==================================================
- Chapter 2: Syntax section C- Arrays
- Ex3: Array values X3
- ===================================================
- */
- public class MyProgram {
- public static void main(String[] args) {
- //variables
- final int SIZE=10;
- int arr[]=new int[SIZE];
- System.out.println("Array values X3: ");
- //init array values X3
- for(int i=0,value=0;i<SIZE;i++,value+=3){
- arr[i]=value;
- System.out.print(arr[i]+" ");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment