How to find what iOS version an iPhone has?

I have an iPhone that a friend wanted me to jailbreak for them. It's older, so I know it can be jailbreaken, but the problem is I don't know what with because the device is passcode-locked and I can't figure out what iOS version it is running. I know I can't actually jailbreak it now because of the passcode, but I need to at least download the program so I can have it ready for them. So I can't use iTunes or such either because of the passcode.

Just restore it so you can bypass the passcode. Why doesn't your friend know it?

I would wait and ask your friend. Chances are he has a bunch of music and contacts that he or she would not appreciate losing.