Apr 26, 2012 at 3:14pm UTC
So I am developing a program based on Fallout's Hacking screen and I need help designing a loop to accept or reject the passcode entered. I also need it so when the user enters a wrong password the count of attempts go down and they have the ability to get more attempts by finding <> [] {} () all within the screen and when those are typed in I need them to be turned into "..." Here's the code so far
#include<iostream>
#include<string.h>
#include<cstdlib>
using namespace std;
main()
{
int attempts=4;
char passcode[10];
//int hackscreen;
//const password = "BACKDOOR";
cout<<"Welcome To Robco Industries (TM) Termlink\n";
cout<<'\n';
cout<<">SETTERMINAL/INQUIRE\n";
system("PAUSE");
cout<<'\n';
cout<<"VT-300\n";
system("PAUSE");
cout<<'\n';
cout<<">SET FILE/PROTECTION-OWNER:RWED ACCOUNTS.F\n";
cout<<">SET HALT RESTART/MAINT\n";
system("PAUSE");
cout<<'\n';
cout<<"Initializing Robco Industries(TM) MF Boot Agent v2.3.0\n";
cout<<"RETROS BIOS\n";
cout<<"RBIOS-4.02.08.00 52EE5.E7.E8\n";
cout<<"Copyright 2201-2203 Robco Ind.\n";
cout<<"Uppermem: 64 KB\n";
cout<<"Root (5AX)\n";
cout<<"Maintenance Mode\n";
cout<<'\n';
cout<<"RUN DEBUG/ACCOUNTS.F\n";
system("PAUSE");
system("cls");
cout<<"ROBCO INDUSTRIES (TM) TERMLINK PROTOCOL\n";
if (attempts >= 1)
{
cout<<"ENTER PASSWORD NOW\n";
}
else
{
cout<<"!!! WARNING: LOCKOUT IMMINENT !!!\n";
}
cout<<'\n';
cout<< attempts << " ATTEMPTS(S) LEFT: [X] [X] [X] [X]\n";
cout<<'\n';
cout<<"0xF9Z9 <(PIANO^&(!@ 0xE0AI (#HALOS$^&*@\n";
cout<<"0xE0A1 $:=:#&(*{]// 0xE0AJ $:=:#&(*{]/}\n";
cout<<"0xE0A2 &(/&*()#$^(! 0xE0AK -+@*(!SMASH[\n";
cout<<"0xE0A3 .,#$(*&!@#;' 0xE0AL (*&%^%^$<>?}\n";
cout<<"0xE0A4 !^*FILES<{#$ 0xE0AM [)$$#%}!@$#{\n";
cout<<"0xE0A5 )*&%^%^$<>?} 0xE0AN ':$(*#&@$>@!\n";
cout<<"0xE0A6 ()$$#%(!@$#{ 0xE0AO ';%{^!!/$@@-\n";
cout<<"0xE0A7 ':$(*#&@$>@! 0xE0AP ($*@#$>?+|RO\n";
cout<<"0xE0A8 ()*@#$?>,.:' 0xE0AQ XIE==(!%(&#@\n";
cout<<"0xE0A9 )(#$@:|TIRES 0xE0AR $@#)(!@$(#*?\n";
cout<<"0xE0AA @#($*!*/-+^^ 0xE0AS |}|#$@(*){!#\n";
cout<<"0xE0AB (@#$@(>^.^]> 0xE0AT <{^.^<)@^(*@\n";
cout<<"0xE0AC #W(*$!$||*%! 0xE0AU (*&^VEGAS&&*\n";
cout<<"0xE0AD &*SPACE:'@#$ 0xE0AV ($!*&!#><$#$\n";
cout<<"0xE0AE %#@#$$#?><>| 0xE0AW %&(&^%*&%{]/\n";
cout<<"0xE0AF )($#@#(*&$#@ 0xE0AX %%&(*&(((*&%\n";
cout<<"0xE0AG &::RIFLE(*&( 0xF0AY *&%*$%*&^*:=\n";
cout<<"0xE0AH =*&(*&{{:<-> 0xE0AZ :''(FLAME(^:\n";
cin >> passcode;
return 0;
}