Wednesday
April 16, 2014

Homework Help: cis

Posted by ami on Friday, February 25, 2011 at 4:15pm.

I have to find three errors and ther two logic and syntax error. HELP ME IN IT AND Below is code.




Rem ===========BEGIN SAMPLE CODE============

REM Read 9 scores and report the average
Dim score(10)

For i = 1 to 10
CALL fillArray
PRINT "The average score is "; Sum()/10:
Next j
End


SUB fillArray
count = 0
For i = 1 to 10
READ datum
if datum > 0 then score(i) = datum
if datum = -1 then
exit sub
end if
count = count + 1
PRINT count, datum
Next i

DATA 85, 92, 68, 84, 86, 94, 74, 79, 88, -1
DATA 84, 92, 68, 84, 86, 94, 74, 79, 88, -1
DATA 83, 92, 68, 84, 86, 94, 74, 79, 88, -1
DATA 82, 92, 68, 84, 86, 94, 74, 79, 88, -1
DATA 81, 92, 68, 84, 86, 94, 74, 79, 88, -1
DATA 79, 92, 68, 84, 86, 94, 74, 79, 88, -1
DATA 78, 92, 68, 84, 86, 94, 74, 79, 88, -1
DATA 77, 92, 68, 84, 86, 94, 74, 79, 88, -1
DATA 76, 92, 68, 84, 86, 94, 74, 79, 88, -1
DATA 75, 92, 68, 84, 86, 94, 74, 79, 88, -1
END SUB

FUNCTION Sum()
total = 0
FOR i = 1 TO 10
LET total = total + score(i)
NEXT i
Sum = total
END FUNCTION

Rem ===========END SAMPLE CODE============

Answer this Question

First Name:
School Subject:
Answer:

Related Questions

Child Psychology - Researchers have concluded that A. the proportion of REM ...
child growth development - Researchers have concluded that A. the proportion of ...
computer - A-Asking the user to pick a number between 1 and 20 and having the ...
physics - Four light bulbs (A, B, C, D) are connected together in a circuit of ...
Math - each "word" in a special code is a three digit number. if no word in the ...
algebra - if there is a 4 digit code and the number choices are 0-9 and the last...
Math - 1.) A security code has seven characters. Each code begins with two ...
ethics - Write a 1,750- to 2,450-word paper that formulates your personal code ...
Introduction to the Criminal Justice System - How does constitutional law affect...
English - Choose three items from the list below. Define your three chosen ...

Search
Members