Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.

debug please

+1 vote
asked Apr 9, 2019 by Cowbura
program deb;
uses crt;
const
n=100;
var
a: array[1..n] of integer;
b,i,j:integer;
begin
a:=20;
randomize;
writeln ('new masiv');
for i:=1 to n do
begin
a[i]:=Random(100);
write(a[i], ' ');
end;
writeln;
for i:=3 to n-1 do
a:=-5;
for j:=1 to n-i do
if a[j] mod 20 then
begin
b:=a[j];
a[j]:=a[i+1];
end;
writeln('sort masiv');
for i:=1 to n do
write(a[i]: ' ');
end.

1 Answer

0 votes
answered Apr 10, 2019 by zemiak (550 points)

now you can improve this sort algorithm as you wish
https://pastebin.com/PUVM6sNa

 

Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and and receive answers from other members of the community.
...