#include <stdio.h>
int countGreater(int threshold, int a[], int N) {
int res = 0;
if(N > 0) {
res = (a[0] > threshold);
res += countGreater(threshold, a + 1, N - 1);
}
return res;
}
int N = 5;
int grades[] = {19, 6, 17, 10, 8};
int main () {
int numPositives = countGreater(9, grades, N);
printf("Positivas: %d", numPositives
); }
I2luY2x1ZGUgPHN0ZGlvLmg+CgppbnQgY291bnRHcmVhdGVyKGludCB0aHJlc2hvbGQsIGludCBhW10sIGludCBOKSB7CiAgICBpbnQgcmVzID0gMDsKICAgIGlmKE4gPiAwKSB7CiAgICAgICAgcmVzID0gKGFbMF0gPiB0aHJlc2hvbGQpOwogICAgICAgIHJlcyArPSBjb3VudEdyZWF0ZXIodGhyZXNob2xkLCBhICsgMSwgTiAtIDEpOwogICAgfQogICAgcmV0dXJuIHJlczsKfQoKCmludCBOID0gNTsKaW50IGdyYWRlc1tdID0gezE5LCA2LCAxNywgMTAsIDh9OwoKaW50IG1haW4gKCkgewogICAgaW50IG51bVBvc2l0aXZlcyA9IGNvdW50R3JlYXRlcig5LCBncmFkZXMsIE4pOwogICAgcHJpbnRmKCJQb3NpdGl2YXM6ICVkIiwgbnVtUG9zaXRpdmVzKTsKfQ==