Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int N, array[10001];
- int main() {
- int resp, caso = 1;
- int i;
- while(scanf("%d", &N) && N != 0) {
- for (i = 0; i < N; i++) {
- scanf("%d", &array[i]);
- if(i == array[i]){
- resp = i;
- }
- //mais alguma coisa aqui envolvendo resp...
- }
- printf("Teste %d\n", caso);
- printf("%d\n\n", resp);
- caso++;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement