what am i missing
i am writing this program and there are errors when I put it through the compiler. I don't understand what the problems are and where they are. The type of programming is Pascal.
The output of my program is suppose to be The end of the day stock for each of the six items. There is stock numbers 1-6. Each of the morning stock has a value. There is a certain amount sold during the day for each stock and so the output is suppose to be the end of the day totals.
Here is what I have:
program invent;
var
s:array[1..6] of integer;
stocknumber,
bsales,(*beginning sales*)
sold,
esales:integer;
begin
repeat
writeln('please enter the stocknumber');
readln(stocknumber);
writeln('please enter the beginning sales for that stocknumber');
readln(bsales);
writeln('please enter the amount sold');
readln(sold);
esales:=(bsales-sold);
end.
I know there has to be a repeat in there so I can do multiple stock numbers but I don't know where to insert it.
Is there anything else wrong with this?
|