Difference between revisions of "Solução: Quermesse - OBI (Paulo Cesar)"

From AdonaiMedrado.Pro.Br
Jump to: navigation, search
Line 1: Line 1:
 
<code lang="c">
 
<code lang="c">
 
#include<stdio.h>
 
#include<stdio.h>
 
#define MAX_SIZE 10000
 
  
 
int main()
 
int main()

Revision as of 13:22, 1 April 2009

#include<stdio.h>
 
int main()
{
  int size, cont, num, cont_test;
  size = 1;
  cont_test = 1;
 
  while( size > 0 )
  {
    scanf("%d",&size);
    for( cont = 0; size > 0, 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;
}