#include <iostream>
using namespace std;
int main()
{
int a[14];
for (int i = 0; i < 14; i++)
a[i] = rand() % 20 - 10;
cout << a[i] << " ";
}
if (a[i] < 0)
a[i] = 3;
cout << endl<<endl;
Объяснение:
#include <iostream>
using namespace std;
int main()
{
int a[14];
for (int i = 0; i < 14; i++)
{
a[i] = rand() % 20 - 10;
cout << a[i] << " ";
}
for (int i = 0; i < 14; i++)
{
if (a[i] < 0)
{
a[i] = 3;
}
}
cout << endl<<endl;
for (int i = 0; i < 14; i++)
{
cout << a[i] << " ";
}
}
Объяснение: