Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <string.h>
- #include <stdlib.h>
- int main() {
- int number, quant, i, certo, j, igual = 0;
- scanf("%d", &quant);
- int numbers[quant-1];
- for(i=0; i<quant-1; i++) {
- scanf("%d", &numbers[i]);
- }
- for(i=1; i<=quant; i++) {
- for(j=0; j<quant-1; j++) {
- if(i == numbers[j]) {
- igual = 1;
- break;
- }
- else {
- certo = i;
- continue ;
- }
- }
- if(igual == 0) {
- printf("%d", certo);
- break;
- }
- else { igual = 0; }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement