0_0_16989336_7471.cpp: In function 'int main()': 0_0_16989336_7471.cpp:15:9: error: expected ';' before 'cout' cout<<(a[n-1]-a[0])*2<<endl; ^