Help, I can't finish this practice it goes like: A local supermarket is running a promotion: each Nth customer will receive one item for free. Customers names are sequentially given as array of strings (see template). Write a function that receives the array of customers, its size, and the N number as arguments, and prints the names of the lucky customers each in a new line. Sample Input 3 Sample output Rayan Bruce Richard Mary
6/28/2021 10:26:26 PM
Mihályi Milán2 Answers
New Answervoid lucky(string list[], int len, int N) { for (int i=N-1; i<len; i+=N) { cout << list[i] << endl; } }
Sololearn Inc.
535 Mission Street, Suite 1591Send us a message