Пишу на С#
int N=Convert.ToInt32(Console.ReadLine());
int[]mas=new int[N];
Random rnd=new Random();
for(int i=0; i<mas.Length; i++)
{
mas[i]=rnd.Next();
}
int proisv=1;
if(mas[i]<0)
proisv*=mas[i];
Console.Writeline("Proisvedenie= "+proisv);
Объяснение:
Пишу на С#
int N=Convert.ToInt32(Console.ReadLine());
int[]mas=new int[N];
Random rnd=new Random();
for(int i=0; i<mas.Length; i++)
{
mas[i]=rnd.Next();
}
int proisv=1;
for(int i=0; i<mas.Length; i++)
{
if(mas[i]<0)
{
proisv*=mas[i];
}
}
Console.Writeline("Proisvedenie= "+proisv);
Объяснение: