100 doors n 100 students problem

CA CS CIMA Prakash Somani (Landmark Group) (23502 Points)

05 June 2008  

There r 100 doors and 100 students. intially all doors r closed. first student no 1 comes n toggles(open if close/close if open) the door no 1 and its multiples, next comes student no 2 and toggles door no 2 and its multiples i.e. door no 2,4,6,8........,student no 3 toggles door no 3 and its multiples i.e.3,6,9,12........., and so on till 100 students complete. at the end how many r open n how many r closed.?