You are on page 1of 1

La Sallete of Roxas College Inc.

Magsaysay St. Vira, Roxas, Isabela

Name:________________________________________

I. Using Java Eclipse; write the following algorithms in Java:


Write a program in Java to input 5 numbers from keyboard and find their sum;
ALGORITHM
1. Start
2. Declare variable n1, n2, n3, n4, n5 and sum as integer
3. Ask the user to enter five (5) numbers (n1, n2, n3, n4, n5).
4. Add the five numbers (n1, n2, n3, n4, n5) and store the result to variable sum.
5. Display sum of five numbers.
6. End

II. Using the same algorithm draw its flowchart (at the back).

You might also like