0_0_38496562_23989.cpp: In function 'int main()': 0_0_38496562_23989.cpp:42:3: error: 'tot' was not declared in this scope tot = 0; ^