It's killing me.
P.S. I'm a noob.
#include<iostream>
using namespace std;
int numlist[1001];
int main()
{
int a;
cin>>a;
for(int i=1;i<=a;i++)
{
for(int j=1;j<=i;j++)
{
if(i*j==a)
{
numlist[i]=i;
numlist[j]=j;
}
else
{
continue;
}
}
}
for(int q=1;q<=1001;q++)
{
if(numlist[q]==0)
{
continue;
}
else
{
cout<<numlist[q]<<'\n';
}
}
return 0;
}