+ 10

Why this code is not running?

https://code.sololearn.com/chFHyG9bsLmr/?ref=app From the array I have to find the minimum value , How to find it?

23rd Dec 2022, 3:35 AM
Riya
Riya - avatar
3 Answers
+ 8
The min function is not defined. You need to include the algorithm header to use this function. The min function expects a range (e.g. an array) as an argument, but in this case it is being passed a single integer (ages[i]).and The variable a is being assigned the result of the expression 50-(50*min(ages))/100, but this expression will not compile because the min function is not defined. https://code.sololearn.com/cGL8Zasi4d85/?ref=app
23rd Dec 2022, 4:33 AM
Sadaam Linux
Sadaam Linux - avatar
+ 8
Sadaam Linux thank you
23rd Dec 2022, 8:55 AM
Riya
Riya - avatar
+ 6
Rick Zalman thank you
24th Dec 2022, 9:15 AM
Riya
Riya - avatar