IST 153 Course Guide

Week 14 – ARRAYS – ONE-DIMENSIONAL

 Read the following:

Bullet7.gif (887 bytes) Tools for Structured Design: Arrays – pg. 231 – pg. 255

Bullet7.gif (887 bytes) Chapter 10 Assignment Page

 Purpose

 Complete: Exercises

Exercises

 Directions

 Grading

Home | Syllabus

COMPLETE QUESTIONS ON THE READINGS:

  1. Problem 1:

    Construct a program flowchart and corresponding pseudocode to solve the following problem. Assume there are ten records, each containing two temperature values. The first temperature value on each record represents a high temperature from a weather station, and the second temperature on each record represents a low temperature from a weather station. Input these value into two one-dimensional arrays with the high temperatures in an array called HIGH and the low temperatures in an array called LOW. After reading all the temperatures, find and output the average high temperature and the average low temperature for the weather stations. Be sure to plan a well-structured, modular program.

     

  2. Problem #2

    Page 253 – Problem #11

     

  3. Problem #3

    A data file contains 20 numbers. You are to read the first 10 numbers into an array called FIRST, the second 10 numbers into an array called SECOND. A third array, THIRD, is to contain the larger of the 2 corresponding elements of FIRST and SECOND. (For example, THIRD(1) is to be the larger of FIRST(1) and SECOND(1)) If the corresponding elements of FIRST and SECOND are equal, store either value into the array THIRD. After all processing is complete, output the values in the arrays FIRST(1), SECOND(1) and THIRD(1). Be sure to plan a well-structured, modular program.

     

  4. Problem #4

    Read 15 numbers from a file. Print the numbers, the average of the numbers and all the numbers that are greater than the average. Be sure to plan a well-structured, modular program.

     

  5. Problem #5

    Read in an unknown amount of numbers from a file. Print the numbers, the average of the numbers and all the numbers that are greater than the average. Be sure to plan a well-structured, modular program.

Back

 

EXERCISE GRADING:

The exercises will count towards the 20% for all homework assignments.

GRADING CRITERIA: 

You will receive full credit for submitting the exercises if they are correct. The total number of points you can receive for the assignment is 100.

Back

Home | Syllabus