English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

How can i produce algorithm in pseudocode?

how can i produce an algorithm in pseudocode for finding the average mark for a given set of 10 marks

2007-11-01 22:26:54 · 3 answers · asked by Anonymous in Science & Mathematics Mathematics

3 answers

pseudo code is a higher level "English-like" description of how you are going to code it.

For example you could say:
sum = 0
count = 10

for n = 1 to count
{add nth mark (mark[n]) to sum}
next n

return sum / count

2007-11-01 22:39:00 · answer #1 · answered by Puzzling 7 · 0 0

The following is pseudo code for your problem.
1.declare an array of size 10 .
2.Find the sum of its elements
3.divide this sum by 10
4.assign this result obtained in 3d step to the average.
5.end of the program

2007-11-01 22:38:52 · answer #2 · answered by madee 2 · 1 0

Think about the steps you need to go through to do it.

Write it down, using shorthand and algebra if necesery

2007-11-01 22:46:38 · answer #3 · answered by Anonymous · 0 0

fedest.com, questions and answers