Initialize the value of the product to 1(not 0 as 0 multiplied with anything returns zero). Traverse till the end of the list, multiply every number with the product. The value stored in the product at the end will give you your final answer.
// PascalABC.NET 3.1, сборка 1218 от 12.04.2016 const n=10;
type Sot=record fam:string; zp:integer; end;
begin var Sotr:=new Sot[n]; Writeln('Вводите фамилию и через пробел зарплату'); for var i:=0 to n-1 do begin var s:=ReadlnString(i+1+':'); var ms:=s.Split; (Sotr[i].fam,Sotr[i].zp):=(ms[0],StrToInt(ms[1])); end; var r:=Sotr.OrderBy(x->x.zp).First; WritelnFormat('{0} получает всего лишь {1}',r.fam,r.zp) end.
Тестовое решение: Вводите фамилию и через пробел зарплату 1: Иванов 32000 2: Петров 28000 3: Козлов 34000 4: Сидорова 41400 5: Пупкин 30000 6: Кузьмина 36000 7: Васечкин 29700 8: Бененсон 32500 9: Паутова 41000 10: Ромашкин 36400 Петров получает всего лишь 28000
Given a list, print the value obtained after multiplying all numbers in a list.
Examples:
Input : list1 = [1, 2, 3]
Output : 6
Explanation: 1*2*3=6
Input : list1 = [3, 2, 4]
Output : 24