Considering the problem you have set, your algorithm is completely wrong. And as already mentioned by niek_e, you're using the for loop incorrectly too!
Follow niek_e's advice and take a good look at using for loops.
His post shows you how to correctly use them..
And as he's already said, you should change void main to int main or risk Salems wrath

heh heh!
Going back to your actual algorithm, what you need to be doing inside main() is something like:
1. initialise your variables, include a boolean flag to check whether the user was correct (initialise it to false).
2. set up your for loop to iterate three times
Inside the loop you need to do this:
- Ask user to enter a value between 1 and 10
- If the entered value matches the password (3?), set your flag to true and break out of the loop
- else if the value is less than one or greater than 10, display an error message.
- else inform the user that they guessed incorrectly..
(finally after the for loop)
3. check the value of your flag.
- if true, the user guessed correctly during the for loop.
- else user guessed incorrectly 3 times and failed!
Hope that's of some help!
Cheers for now,
Jas.