Monday, June 13, 2011

C++ : Algorithm and Program Finding The average of n positive integers

download

ANALYSIS
The formula for the amount of data on the number of data, with x, is the i-th data

ALGORITHM
{Given n data later in the search for the average}
DECLARATION
i, n, the number, x: integer
Average: real
DSKRIPSI
read (n)
total <- 0for i <- of 1 to n doread (x)total <- total + xendforaverage <- sum / nwrite (average)download

0 comments:

Post a Comment

Twitter Delicious Facebook Digg Stumbleupon Favorites More