1. The problem statement, all variables and given/known data I need to write a program which calculates the sum of all the numbers of an array of unknown length. The input of a ends when a's value is the letter 'D'. 2. Relevant equations 3. The attempt at a solution program homework; uses wincrt; var a:array[1..100] of integer; S, i:integer; begin S:=0; i:=1; repeat read(a); S:= S+ a; i:= i+1 until a='D'; write(S); end.