i am building this program using th EOF function but the eof never terminates idk how to terminate it ,have tried everything including backslash,spaces,-1 ,return .
this is my program
#include
using namespace std;
int main()
{
int number,num,count=0;
cin>>num;
while(scanf("%d" , &number) != EOF)
{
if(number==num)
{
count=count+1;
}
count++;
}
cout<<count<<endl;
}
and this is screenshot of the output terminal