# can anyone solve this problem for me

Show 80 post(s) from this thread on one page
Page 1 of 2 12 Last
• 05-30-2012
s000p222
can anyone solve this problem for me
can anyone solve this problem for me

I need help with this problem can you solve it for me ( write the program)

-A password-protected security door can only be opened when a user inserts a valid 4-digit personal identification number (PIN).
-The program starts by asking the user to enter a 4-digit PIN.If it is valid, the locked door is opened and the program returns for another user
input. If, on the other hand, the PIN is invalid the program checks whether three attempts were made. If so, the alarm is triggered; otherwise the user is given another try to input the correct PIN.
-Assume that your security door system supports 10 users each with a unique PIN.

and i'll BE THANKFULL :redface::redface:
• 05-30-2012
Salem
No we can't - read the forum rules.
This isn't a homework on demand service.
• 05-30-2012
s000p222
it's not homework,

i have a final exam and this question was in one of the final exam sample
i just want to know how to solve it.

hope you can help.
• 05-30-2012
s000p222
i already done the problem i just need help i dont it only for one user and here is the code i just need it for 10 i cant do it

Code:

``` #include <iostream> using namespace std; void main() { int pin=1111; int pin2=0; int cont=0; while(cont<3) { if (pin2==0) { std::cout << "please enter your pin number\n" ; std::cin >> pin2; } if ( pin==pin2) { std::cout << "Door opens\n" ; cont=4; } else { cont++; pin2=0; } if (cont==3) { std::cout << "Alarm\n" ; } } }```
• 05-30-2012
laserlight
Hint: use an array to store a list of valid PIN numbers. Then, loop over the array to check of the user input matches any of them.

Also, you should indent your code properly and specify the return type of main as int, not void.
• 05-30-2012
s000p222
Quote:

Originally Posted by laserlight
Hint: use an array to store a list of valid PIN numbers. Then, loop over the array to check of the user input matches any of them.

Also, you should indent your code properly and specify the return type of main as int, not void.

thanks for hint but really i'm a beginners and need help i want to get a good grade out at the end of the semester.
• 05-30-2012
manasij7479
Quote:

Originally Posted by s000p222
...but really i'm a beginners and need help i want to get a good grade out at the end of the semester.

What exactly do you need help with ?
Did you try to do what laserlight suggested ?
• 05-30-2012
whiteflags
We can't take your test for you. Laserlight gave a good hint... you might want to revisit the array and loop structure part of your textbook so that you understand what he's suggesting. And you might do better on the test in general.
• 05-30-2012
s000p222
I'll try thanks all for the support.
if i have something i'll let you know.

BIG THANKS TO YOU ALL.
WISH ME LUCK...
• 05-30-2012
s000p222
I'm here to learn first. i really learned alot from you now, i understand the arrays and loops
i know what they do but my problem is writing the program i'm good at the theory part but at tutorial that my difficulty.

I will apreciat it if you can write me the progrom or a program similar to it so i can see how it's written.
• 05-30-2012
manasij7479
Congrats, you are already in step 3.5 !
http://cboard.cprogramming.com/gener...-homework.html
Virtual cookies if you can get to 5b ...before the thread is closed.
• 05-30-2012
s000p222
Quote:

Originally Posted by manasij7479
Congrats, you are already in step 3.5 !
http://cboard.cprogramming.com/gener...-homework.html
Virtual cookies if you can get to 5b ...before the thread is closed.

first i'm here to learn thats why i'm here if you dont want to help that's ok, but don't come and say this and that
it's not a homework i'm not at school. and this is for my finals i want to know how to solve this kind of problems
they can solve any similar one i don't care. I JUST WANT TO LEARN
• 05-30-2012
QuantumPete
Quote:

Originally Posted by s000p222
I will apreciat it if you can write me the progrom or a program similar to it

I don't think you can afford my hourlies...
• 05-30-2012
rags_to_riches
Quote:

it's not a homework i'm not at school. and this is for my finals
Isn't this contradictory? Or are you trying to say you're just not physically at the school at this moment. Because obviously that would make a big difference.

Also begging here
• 05-30-2012
s000p222
OK ok all i'm sorry i apoligize but god with all this negativity.
Show 80 post(s) from this thread on one page
Page 1 of 2 12 Last