No output is showing only success is coming

#include
using namespace std;
const int len = 1000000;

int main()
{
int n;
for(int i=0;i<n;i++)
{
int a,b;
int count=0;
cin>>a>>b;
int arr[b+1] = {0};

for (int i = 2; i < b; i++)
{
    for (int j = i * i; j < b; j+=i)
    {
        arr[j - 1] = 1;
    }
}
for (int i = a; i < b; i++)
{
    if (arr[i - 1] == 0)
	count++;

}
cout<<count<<endl;

}
return 0;
}
unable to find error in this code

You need to use prime seive optimisation in your code , and also a and b given are inclusive, so your loop will run from i=a, i<=b , i++ …