Main.cc: In function 'int main()': Main.cc:5:5: error: expected initializer before 'cin' cin>>a1>>a2>>n; ^ Main.cc:6:19: error: 'n' was not declared in this scope cout<<(a2-a1)*n; ^