На питоне так:
Объяснение:
using math
mass = []
for i in range(15):
mass.append(int(input()) #Вводим массив
#Сама программа:
res = 1
was = False
if not was and mass[i] > 0:
was = True
if was:
res *= mass[i]
print(res)
А на PascalABC.NET вот так:
begin
var a := ReadArrReal(15);
Abs(a[a.FindIndex(p-> p > 0)+1:].Product).Println
end.
На питоне так:
Объяснение:
using math
mass = []
for i in range(15):
mass.append(int(input()) #Вводим массив
#Сама программа:
res = 1
was = False
for i in range(15):
if not was and mass[i] > 0:
was = True
if was:
res *= mass[i]
print(res)
А на PascalABC.NET вот так:
begin
var a := ReadArrReal(15);
Abs(a[a.FindIndex(p-> p > 0)+1:].Product).Println
end.