Three pots on the windowsill; cm holds how many centimetres each has grown. One line per plant: its name, then as many # as centimetres, like Basil: ###. The name and the newline are already printed.
Basil: ### Mint: ##### Chili: ##
#include <stdio.h>
int main(void) {
const char *plants[] = {"Basil", "Mint", "Chili"};
int cm[] = {3, 5, 2};
for (int i = 0; i < 3; i++) {
printf("%s: ", plants[i]);
// your code here: one more loop that prints cm[i] #s
printf("\n");
}
return 0;
}
Run tries the examples. When they look right, Submit.