Last active
October 22, 2017 12:16
-
-
Save penut85420/2aba45482557aaa9a1fdf30ce14eb9fb to your computer and use it in GitHub Desktop.
int array with eof
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
int main() { | |
int i = 0, n[100]; | |
while (scanf("%d", &n[i++]) != EOF) ; i--; | |
for (int j = 0; j < i; j++) | |
printf("%d ", n[j]); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment