int N1, N2, sum=0;
cin >> N1 >> N2;
for (; N1< N2; N1++){
for (int j=1; j<=i/2; j++){
if (i%j==0) sum+=j;}
if(sum==i) cout << sum;}
It outputs a lot of error, how should i solve it? thank youuu
main.cpp:13:1: error: 'cin' does not name a type
cin >> N1 >> N2;
^
main.cpp:14:1: error: expected unqualified-id before 'for'
for (; N1< N2; N1++){
^
main.cpp:14:8: error: 'N1' does not name a type
for (; N1< N2; N1++){
^
main.cpp:14:16: error: 'N1' does not name a type
for (; N1< N2; N1++){
^