After reading your comment I came to a conclusion that my assumption about EOF was wrong so I went to re-read information about EOF and noticed that I need to enter ctrl+z instead of -1.
With that...
Type: Posts; User: Hater
After reading your comment I came to a conclusion that my assumption about EOF was wrong so I went to re-read information about EOF and noticed that I need to enter ctrl+z instead of -1.
With that...
#include <stdio.h>
#include <stdlib.h>
#define N 5
int main()
{
int counter = 0, num = 0;
int memory[N];
while(scanf("%d", &num) != EOF){