You are viewing a single comment's thread. Return to all comments →
int tallest = candles[0]; int count = 1;
for (int i = 1; i < candles_count; i++) { if (candles[i] > tallest) { tallest = candles[i]; count = 1; } else if (candles[i] == tallest) { count++; } } return count;
Seems like cookies are disabled on this browser, please enable them to open this website
Birthday Cake Candles
You are viewing a single comment's thread. Return to all comments →
*For C *
int tallest = candles[0]; int count = 1;