fork download
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. int main() {
  5. int n;
  6. int ret = scanf("%d", &n);
  7. int *valores;
  8. if (ret != 1) {
  9. printf("0\n");
  10. return 1;
  11. } else {
  12. valores = malloc(n * sizeof(int));
  13. for (int i = 0; i < n; i++) {
  14. if (scanf("%d", &valores[i]) != 1) valores[i] = 885444751;
  15. int c;
  16. while ((c = getchar()) != '\n' && c != EOF) {}
  17. }
  18. }
  19. for (int i = 0; i < n; i++) printf("%d\n", valores[i]);
  20. }
  21.  
  22. //https://pt.stackoverflow.com/q/476061/101
Success #stdin #stdout 0s 4320KB
stdin
3
1
a
2

stdout
1
885444751
2