Skip to content

Latest commit

 

History

8 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Average

The purpose of this exercise is to train you to use simple loops and conditional statements.

Estimated workload of this exercise is 20 min.

Description

Please, proceed to Average class and write a program that reads a sequence of integer values from standard input and finds the average value.

Details:

  • You must read sequence values until the next one is 0. Zero value means end of the input sequence.
  • The sequence is guaranteed to contain at least one value.
  • Average value is also an integer. Use integer operations.

Examples


Input: 1 2 3 4 5 0

Output: 3


Input: 1 2 3 4 6 0

Output: 3


Input: 1 2 3 4 0

Output: 2


Input: 1 1 9 0

Output: 3


About

Epam university tasks

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages