I have a problem, I have this code and when I run it, the code starts and tells me to enter numbers, but when I enter them, nothing happens
the code is supposed to show me the elements that divided by 2 give 0 from the vector, but it doesn't do anything(nu sunt elemente pare means there are no elements that divided by 2 give 0.....and numere pare means elements that divided by 2 give 0

I expected the two to give me the elements in the vector that are exactly divisible by 2, but the code doesn't give them to me this is the code:
#include <iostream>
using namespace std; int n,i,a[100],t;
int main()
{
cout << "n="; cin>>n;
i=1;
do{
cin>>a[i];
if(a[i]%2==0)t++;
}while(i<n||i==n);
i++;
if(t==0){
cout<<"Nu sunt elemente pare.";
}else cout<<t<<" numere pare";
return 0;
}
Just to show you current C++ usually is written differently than what you are learning now.