0_0_19245514_24668.cpp: In function 'int main()': 0_0_19245514_24668.cpp:24:9: error: 'else' without a previous 'if' else ans=log10((double)(n+1)/double(n)); ^