arrayPract1 - number2[i = i*2 1 for(i=0;i<=9;i...

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*; 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<=9;i++) { c[x]=number2[i]; x++; c[x]=number[i]; x++; } for(i=0;i<=9;i++) System.out.println(number[i]); System.out.println(); for(i=0;i<=9;i++) System.out.println(number2[i]); System.out.println(); for(i=0;i<=19;i++) System.out.println(c[i]); System.out.println(); System.out.println("Have a nice day"); } }...
View Full Document

This note was uploaded on 06/17/2011 for the course COMP 2302 taught by Professor Staff during the Spring '11 term at Kennesaw.

Ask a homework question - tutors are online