Main.cc: In function ‘int main()’: Main.cc:6:6: error: redeclaration of ‘int c’ int c=a/10%10+a%10; ^ Main.cc:4:10: note: ‘int c’ previously declared here int a,b,c; ^