eccocodice:void ricerca_binaria( int *a, int n, int x, int centrale, bool found ){ int inferiorire,superiore; inferiore=1; superiore=n; while ( inferiore < superiore ){ centrale=(inferiore+superiore)/2; if (x>a[centrale]) inferiore=centrale+1; else superiore=centrale; } found=(a[inferiore]=x); }:gren:

:gren:
Free as in Freedom... 
Rispondi quotando