Main.cc: In function ‘int main()’: Main.cc:5:10: error: redeclaration of ‘int n’ int n,m,n,1,m1,n2,m2,s1=0,s2=0; ^ Main.cc:5:6: note: ‘int n’ previously declared here int n,m,n,1,m1,n2,m2,s1=0,s2=0; ^ Main.cc:5:12: error: expected unqualified-id before numeric constant int n,m,n,1,m1,n2,m2,s1=0,s2=0; ^ Main.cc:7:7: error: ‘n1’ was not declared in this scope cin>>n1>>m1>>n2>>m2; ^~ Main.cc:7:7: note: suggested alternative: ‘n’ cin>>n1>>m1>>n2>>m2; ^~ n Main.cc:7:11: error: ‘m1’ was not declared in this scope cin>>n1>>m1>>n2>>m2; ^~ Main.cc:7:11: note: suggested alternative: ‘m’ cin>>n1>>m1>>n2>>m2; ^~ m Main.cc:7:15: error: ‘n2’ was not declared in this scope cin>>n1>>m1>>n2>>m2; ^~ Main.cc:7:15: note: suggested alternative: ‘n’ cin>>n1>>m1>>n2>>m2; ^~ n Main.cc:7:19: error: ‘m2’ was not declared in this scope cin>>n1>>m1>>n2>>m2; ^~ Main.cc:7:19: note: suggested alternative: ‘m’ cin>>n1>>m1>>n2>>m2; ^~ m Main.cc:8:2: error: ‘s1’ was not declared in this scope s1=(n1-1+m1-1)+(n-n2+m-m2); ^~ Main.cc:8:2: note: suggested alternative: ‘y1’ s1=(n1-1+m1-1)+(n-n2+m-m2); ^~ y1 Main.cc:9:2: error: ‘s2’ was not declared in this scope s2=(n2-1+m2-1)+(n-n1+m-m1); ^~