Well, the first thing to do is to define n, i, e, r, p.
the first lines, which I corrected, should look like it
void setup() {
using namespace std;
{
int main() ;
int (n,i,e,r,p);
cin>>n;
More than that I cannot say, as I need to know what n, i, e, r, p are.
If you can tell me, I can help you further.
Other than that, it is a good program