I am trying to find out the euler-totient values for all integers upto 10 ^ 5. However, I am getting terrible outputs for the below code, Can anyone please suggest me as to where am I going wrong ? Thanks in advance. :) Here's the link to my code. http://codepad.org/hexai2nk