You are on page 1of 1

ELECTRONICS ENGINEEERING DEPARTMENT

ACTIVITY NO.: 9

Course ECE 340 – Advance Computer Programming for ECE


Topics Covered: Primitive Data Types, Operators, Scanner Class

- To be able to know the creation of variables in a program


Objectives: - To be able to use the arithmetic operators
- To be able to use Scanner Class

Description
Write a program that accepts five values of type double and displays their average.
Do not declare five different variables.

Sample Output if Applicable


First Number: 1
Second Number: 2
Third Number: 3
Fourth Number: 4
Fifth Number: 5
*************************************
The average of 5 numbers is: 3.0

Remarks
Save your file in your Activities folder. Use the filename Activity9.java

You might also like