#include <stdio.h>
#include <stdlib.h>
int busca( int v[ ] , int n, int k) {
if ( -- n< 0 ) return 0 ;
return ( v[ n] > k? 1 : 0 ) + busca( v, n, k) ;
}
int main( ) {
int n;
printf ( "DIGITE A QUANTIDADE DE ELEMENTOS DO VETOR:" ) ;
int v[ n] , i, k;
for ( i = 0 ; i < n; i++ ) {
printf ( "Digite o elemento %d: " , i
) ; }
printf ( "x = %d" , busca
( v
, n
, k
) ) ;
return 0 ;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxzdGRsaWIuaD4KCmludCBidXNjYShpbnQgdltdLCBpbnQgbiwgaW50IGspIHsKICAgIGlmICgtLW48MCkgcmV0dXJuIDA7CgogICAgcmV0dXJuICh2W25dPms/MTowKSArIGJ1c2NhKHYsIG4sIGspOwp9CgoKaW50IG1haW4oKSB7CglpbnQgbjsKCXByaW50ZigiRElHSVRFIEEgUVVBTlRJREFERSBERSBFTEVNRU5UT1MgRE8gVkVUT1I6Iik7CglzY2FuZigiJWQiLCAmbik7CgoJaW50IHZbbl0sIGksIGs7CgoJZm9yKGkgPSAwOyBpIDwgbjsgaSsrKSB7CgkJcHJpbnRmKCJEaWdpdGUgbyBlbGVtZW50byAlZDogIiwgaSk7CgkJc2NhbmYoIiVkIiwgJnZbaV0pOwoJfQoKCXByaW50ZigiRGlnaXRlIHVtIG51bWVybzogIik7CglzY2FuZigiJWQiLCAmayk7CglwcmludGYoInggPSAlZCIsIGJ1c2NhKHYsIG4sIGspKTsKCglyZXR1cm4gMDsKfQo=