|Show us what you have done so far, and give a more exact specification of the problem. Where is the "element" stored? On disk, in memory, is it to be input from the console? What sort of output is required? Result in a register, in memory, printed to the console?|
I'm happy to give hints on coursework assignments if people can demonstrate that they have made an effort towards solving the problem, but I don't provide ready-to-copy solutions.