BoBaH » 11 май 2005, 08:34
program Project1;
{$APPTYPE CONSOLE}
uses
SysUtils;
var
count, m: integer;
ArrayInt : array of Integer;
begin
Write('input lenght of array:');
Readln(count);
Write('input m:');
Readln(m);
SetLength(ArrayInt, count);
for count := 0 to (Length(ArrayInt)-1) do
begin
Write('A[',count,']:');
Readln(ArrayInt[count]);
end;
writeln;
for count := 0 to (Length(ArrayInt)-1) do
begin
if (ArrayInt[count] mod m)>0 then writeln('A[',count,']:',ArrayInt[count])
end;
readln;
end.
Проверял вроде все работает. Выводит все числа которые не делятся на m, ведь такое условие?
program Project1;
{$APPTYPE CONSOLE}
uses
SysUtils;
var
count, m: integer;
ArrayInt : array of Integer;
begin
Write('input lenght of array:');
Readln(count);
Write('input m:');
Readln(m);
SetLength(ArrayInt, count);
for count := 0 to (Length(ArrayInt)-1) do
begin
Write('A[',count,']:');
Readln(ArrayInt[count]);
end;
writeln;
for count := 0 to (Length(ArrayInt)-1) do
begin
if (ArrayInt[count] mod m)>0 then writeln('A[',count,']:',ArrayInt[count])
end;
readln;
end.
Проверял вроде все работает. Выводит все числа которые не делятся на m, ведь такое условие?