Sorry guys I don't know how to copy so i will have to post images. Basically for my assigment i have to use WHILE , i'm making mistake somewhere but i cannot seem to find it. I compiled it it works then i run it , type 5 numbers, (2,14,9,7,1) and it only prints one number divisable by 7. [1]: https://i.stack.imgur.com/ykn2J.png [2]: https://i.stack.imgur.com/G5GAV.png EDIT: i got text so you dont have to check
Program Divisible;
var n,s,i,x:integer;
begin
writeln('How many numbers will you type');
read(n);
begin
s:=0;
I:=1;
end;
while I < n do
begin
writeln('What are those numbers?');
read(x);
If x mod 7 =0 then
begin
s:=x+0; /help
end;
I:=I+1;
end;
writeln('Numbers divisible by 7 are');
writeln(s);
end.