#include <stdio.h>
int main() {
int vetor[4], cont=0;
for (int i = 0; i < 4; i++) {
printf("Introduza a %da. idade: ", i
+ 1); if (vetor[i] >= 18) cont++;
}
printf("Das 4 idades inseridas, %d sao maiores de idade.", cont
); }
//https://pt.stackoverflow.com/q/311194/101
I2luY2x1ZGUgPHN0ZGlvLmg+CgppbnQgbWFpbigpIHsKICAgIGludCB2ZXRvcls0XSwgY29udD0wOwogICAgZm9yIChpbnQgaSA9IDA7IGkgPCA0OyBpKyspIHsKICAgICAgICBwcmludGYoIkludHJvZHV6YSBhICVkYS4gaWRhZGU6ICIsIGkgKyAxKTsKICAgICAgICBzY2FuZigiJWQiLCAmdmV0b3JbaV0pOwogICAgICAgIGlmICh2ZXRvcltpXSA+PSAxOCkgY29udCsrOwogICAgfQogICAgcHJpbnRmKCJEYXMgNCBpZGFkZXMgaW5zZXJpZGFzLCAlZCBzYW8gbWFpb3JlcyBkZSBpZGFkZS4iLCBjb250KTsKfQoKLy9odHRwczovL3B0LnN0YWNrb3ZlcmZsb3cuY29tL3EvMzExMTk0LzEwMQ==