Purchase

Dessign the function @compra(llista, diners)@ which, given a list llistallista of prices of articles and a quantity of dinersdiners in euros, returns the number of articles that can be bought with this miney following the order in which they appear in the list. Whenever an article cannot be bought it will be left out. The solution must take into account that no article costs less than 10 euros.

Sample session

Problem information

Author: InfBesos

Generation: 2026-01-25T13:42:37.857Z

© Jutge.org, 2006–2026.
https://jutge.org