Solução: Quermesse - OBI (Paulo Cesar)
From AdonaiMedrado.Pro.Br
Revision as of 12:56, 1 April 2009 by 200.17.147.2 (Talk)
#include<stdio.h> #define MAX_SIZE 10000 int main() { int size, cont, num, cont_test; size = 1; cont_test = 1; while( size > 0 && size <= MAX_SIZE ) { scanf("%d",&size); for( cont = 0; (size > 0 && size <= MAX_SIZE), cont < size; cont++) { scanf("%d",&num); if( num == cont+1 ) { printf("Teste %d\n%d\n\n",cont_test,num); break; } } cont_test++; } return 0; }