CS1113_Homework 8 # 3

CS1113_Homework 8 # 3 - // Declare variables int n=7 int...

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

View Full Document Right Arrow Icon
Sheet1 Page 1 // Matt Hergenrether // Section 10 // CS 1113 // April 22, 2008 // Homework 8 # 3 // deals with arrays import java.util.* // util contains the Scanner class public class Array { public static void main(String[] args) { Scanner scan = new Scanner(System.in)
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: // Declare variables int n=7 int k=n-1 int temp=0 int a = new int[n] for(int x = 0 x != k x++) { temp = a[x] a[x] = a[k] a[k] = temp k--} } // End of Main } //End of class...
View Full Document

This note was uploaded on 09/28/2011 for the course CS 1113 taught by Professor Chandler during the Fall '08 term at Oklahoma State.

Ask a homework question - tutors are online