i need help with my fortran hw. if anyone knows anything about it, please shed some light.
the problem is:
Suppose that a row of mailboxes is numbered from 1 to 150 and that beginning with mailbox 2, we open the doors of all the even-numbered mailboxes. Next, beginning with mailbox 3, we go to every third mailbox, opening its door if it is closed and closing it if it is open. we repeat this procedure with every fourth mailbox, then every fifth, and so on. write a program to determine which mailboxes will be closed when this procedure is completed.
the problem is due tomorrow! and im freaking out.
thnx in advance.
the problem is:
Suppose that a row of mailboxes is numbered from 1 to 150 and that beginning with mailbox 2, we open the doors of all the even-numbered mailboxes. Next, beginning with mailbox 3, we go to every third mailbox, opening its door if it is closed and closing it if it is open. we repeat this procedure with every fourth mailbox, then every fifth, and so on. write a program to determine which mailboxes will be closed when this procedure is completed.
the problem is due tomorrow! and im freaking out.
thnx in advance.
Comment