Q46.Consider the procedure below, where `aList` is a non-empty list of real numbers. At the end of execution, which options are correct?
```
Procedure cumulative(aList)
sum = 0, cumulList = []
foreach element in aList {
sum = sum + element
cumulList = cumulList ++ [sum]
}
return(cumulList)
End cumulative
```
Save
Check
Details
Q46
2 Apr 2023
Q46.Consider the procedure below, where `aList` is a non-empty list of real numbers. At the end of execution, which options are correct?
```
Procedure cumulative(aList)
sum = 0, cumulList = []
foreach element in aList {
sum = sum + element
cumulList = cumulList ++ [sum]
}
return(cumulList)
End cumulative
```