How to find my password for Wi-Fi?

I biught an iphone and in order to get on my Wi-Fi I have to have a passcode that I forgot

Have you connected your pc to the Wi-Fi? If yes.
Then you can click on the connection symbol in the taskbar and go to properties to give you the password(Note: It requires the admin password for your pc)

The passcode is the preferred key like 1, 2, 3, 4
the code should be same in router and the device (laptop or iphone)

On your computer, go to the place where you click the button to connect to the Wi-Fi. Right click and got properties. You should see a window with the pass code. The pass code is filled in black circles so their should be a button "show characters" or "show password" or something similar. You should click that, hit yes to the pop up and your password is shown. Type that in on your phone and your good to go! A good idea would also be to write it down too so you have it incase you need it.