Перевести с С++ на Pascal
#include
#include
#include
using namespace std;
int main()
{
int N = 20;
int A[N];
srand(time(NULL));
for (int i = 0; i < N; i++)
A[i] =50- rand() % 100 ;
for (int i = 0; i < N; i++)
cout << A[i] << " ";
cout << endl << endl;
int min = A[0],pos = 0,count = 0,temp=0;
for (int i = 0; i < N; i++)
{
if (min > A[i])
{
min = A[i];
pos = i;
}
}
for (int i = pos + 1; i < N; i++)
{
if (A[i] < 0)
count++;
if (count == 3)
{
temp = A[i];
break;
}
}
cout <<" Min = " << min << " 3otr = "<< temp<<"\n";
for (int i = 0; i < N; i++)
A[pos] = temp;
for (int i = 0; i < N; i++)
cout << A[i] << " ";
return 0;
}