您的位置:寻梦网首页编程乐园Java天地Core JavaJava Lecture Notes

Introduction

Content

Apply

Reflect

Extend

previous.gif
 (3087 bytes)

next.gif
 (2959 bytes)


Reflect Index

Reflect Page # 2

Review Question 2

Suppose I am writing a program concerned with weather forecasting. I declare an array of doubles to store the temperature measured every day, like this:

double dailyTemperature[] = new int[365];

Assuming I have a way of storing the daily temperatures in the array, how could I work out the average annual temperature? Write a few lines of Java to do this (not a whole program).

Discussion of Review Question 2

Back to top

basicline.gif (169 bytes)

RITSEC - Global Campus
Copyright ?1999 RITSEC- Middlesex University. All rights reserved.
webmaster@globalcampus.com.eg