oops stupid questoin.
Type: Posts; User: SirTalkAlot415
oops stupid questoin.
I'm still new to programming and are currently working on a simple project. I'm just wondering if there is a way to write something a certain number of times. Like if i wanted to write X 3 times...
You could put the numbers into an array such as array[x]. Then create a loop like for(x=0; ;x+=3). The loop would move to the number 3 spots after the original number in the array. That should get...
Thank you for all of your help. I have the programming running without any found bugs. My final output is
for(x=1;x<=5;x++)
{
cin>>entry;
...
Okay, the program now accepts any of the four passwords. My revised code is
for(x=1;x<=5;x++)
{
cin>>entry;
while(entry!=password[t])
...
Okay, I got the program to accept multiple inputs with
for(x=1;x<=5;x++)
{
if(entry==password[t])
{
...
Inside the for loop, i need to create a loop to check each password in the array. Once the password is correct, I'll break the loops and make the console write "program booting".
Yea, i don't want it to output "incorrect" for each check of the passwords. I used the for loop to give the user 5 attempts to get the password right before shutting down to prevent users from just...
The code that I'm repeating is the code that checks the password
if(entry==crctpass)
{
cout<<"You have entered the...
So yea I'm new to programming. I've been trying to come up with some original programs and decided to make a password program. My problem is that i can't figure out how to get the program to accept...
I'm not sure what the Sleep() function does, but to "set it up so the user is automatically logged out after X number of attempts" is easy without having to nest a for loop. Just use the for loop...