Three reviews gave 3, 5 and 1 stars. The function stars(n) prints a line of n *s; it's void, so it only prints and gives nothing back. Fill in the line inside it, then call it in main for each rating.
*** ***** *
#include <stdio.h>
void stars(int n) {
for (int i = 0; i < n; i++) {
// your code here: print one *
}
printf("\n");
}
int main(void) {
int ratings[] = {3, 5, 1};
for (int i = 0; i < 3; i++) {
// your code here: call stars with this rating
}
return 0;
}
Run tries the examples. When they look right, Submit.