Exitcode 1 need help

i am coding at this paltform fist time and the problem is I do not understand how to take input at this compiler. code is working fine in offline compiler. I need help to learn how to write code here.
#include
#include<stdio.h>
#include<math.h>
int main()
{
int n;
static count=0;
cin>>n;

for(int i=1;i<=n;i++)
{
    if(n%i==0)
    count++;
}
if(count==2)
cout<<"Prime";
else
cout<<"Not Prime";
return 0;

}

Hey @safdar please insert ‘using namespace std;’ in your code where you are importing the libraries .
Also declare your count variable as static int. It should work fine but if you still have any further queries then let me know.

Hey @safdar I hope I have solved your doubt if so please mark the doubt as resolved.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.