Advertisement
Guest User

Untitled

a guest
Apr 18th, 2014
35
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int N, array[10001];
  4.  
  5. int main() {
  6.  
  7. int resp, caso = 1;
  8. int i;
  9.  
  10. while(scanf("%d", &N) && N != 0) {
  11.  
  12. for (i = 0; i < N; i++) {
  13. scanf("%d", &array[i]);
  14. if(i == array[i]){
  15. resp = i;
  16. }
  17. //mais alguma coisa aqui envolvendo resp...
  18.  
  19. }
  20.  
  21. printf("Teste %d\n", caso);
  22. printf("%d\n\n", resp);
  23. caso++;
  24. }
  25.  
  26. return 0;
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement