Solução: Quermesse - OBI (Paulo Cesar)

From AdonaiMedrado.Pro.Br
Revision as of 13:44, 1 April 2009 by 200.17.147.2 (Talk)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
#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);
    }
    cont_test++;
  }
 
  return 0;
}