arrayPract1

arrayPract1 - number2[i] = i*2+1; }...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
import java.util.*; import java.lang.*; import java.io.*; import java.text.*; import java.math.*; import java.text.DecimalFormat; i //Jeremy Debruce //3/18/09 // Emerging of Arrays / public class arrayPract1 { static int i,x=0; public static void main(String[] args) { int [] number = new int [10]; int [] number2 = new int [10]; int [] c = new int [20]; for (i=0;i<=9;i++) { number[i] = (i+1)*2;
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: number2[i] = i*2+1; } for(i=0;i&lt;=9;i++) { c[x]=number2[i]; x++; c[x]=number[i]; x++; } for(i=0;i&lt;=9;i++) System.out.println(number[i]); System.out.println(); for(i=0;i&lt;=9;i++) System.out.println(number2[i]); System.out.println(); for(i=0;i&lt;=19;i++) System.out.println(c[i]); System.out.println(); System.out.println(&quot;Have a nice day&quot;); } }...
View Full Document

Ask a homework question - tutors are online