18.10.2014 Views

Object-oriented Software in Ada 95

Object-oriented Software in Ada 95

Object-oriented Software in Ada 95

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

72 Procedures and functions<br />

• Write a program that f<strong>in</strong>ds the average of three ra<strong>in</strong>fall read<strong>in</strong>gs taken dur<strong>in</strong>g the last 24 hours. The<br />

program should pr<strong>in</strong>t the average of the samples plus the read<strong>in</strong>gs <strong>in</strong> ascend<strong>in</strong>g order. For example, if<br />

the <strong>in</strong>put data was:<br />

4.0 6.0 5.0<br />

then the program should produce output of the form:<br />

Ra<strong>in</strong>fall average is : 5.00<br />

Data values (sorted) are : 4.00 5.00 6.00<br />

© M A Smith - May not be reproduced without permission

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!