Homework 1 - numeric(ASCII character data Write a short...

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

View Full Document Right Arrow Icon
ELEC 2220 - Homework Assignment #1 Prerequisite Review (Updated after Friday’s class) Due Monday, May 24, 2010 1. Write a short program in either C or Java that will read non-zero integer numbers entered from a keyboard until a zero is entered, and then identify and print the smallest number, the largest number, and the average value (don’t count the 0 in the average). Assume numbers in the range [-32000 … +32000]. Execute the program, entering 12-15 values, scattered across the above range (both positive and negative values). Turn in a printout of the program and the results Example: 30 -25 18 -3 0 Smallest = -25 Largest = 30 Average = 5 2. The first program manipulated numeric data. This program is to manipulate non-
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: numeric (ASCII) character data. Write a short program (in any language) that will read three names from the keyboard, and then print the list in alphabetical order. Run your program twice, with the names entered exactly as listed below, and in the given order. One has all of the names capitalized, and the second has two of the names beginning with lower-case letters. Turn in a printout of your program and the sorted list printed by the program for each run, and discuss whether the program produced what you expected for Example 2. Example 1: Enter Sorted George Bob Ralph George Bob Ralph Example 2: Enter Sorted george ? Ralph bob...
View Full Document

This note was uploaded on 09/23/2011 for the course ELEC 2220 taught by Professor Staff during the Summer '08 term at Auburn University.

Ask a homework question - tutors are online