So I have been staring at this code for the past 2 hours...For some reason it won't let the user input something for everything question.
Any help would be appreciated.
Code:
#include <iostream>
#include <cstdlib>
#include <cstdio>
using namespace std;
int main(){
int memberchoice;
int informationcorrectchoice;
cout << "Startup Employee Informatin.\n";
cout << "Are you a member?" << endl;
cout << "1. Yes" << endl;
cout << "2. No" << endl;
cin >> memberchoice;
if(memberchoice == 1){
cout << "Please enter information.\n";
do{
cout << "Username: \n";
char username[50];
cin >> username;
cout << "Processing: " << username << "\n";
cout << "Password: " << endl;
char password[50];
gets(password);
cout << "Processing: " << password << "\n";
cout << "Social Security Number: \n";
char ssnumber[11];
gets(ssnumber);
cout << "Processing: " << ssnumber << "\n";
cout << "Security Question: \n";
char securityquestion[3000];
gets(securityquestion);
cout << "Processing: " << securityquestion << "\n";
cout << "Security Answer: \n";
char securityanswer[3000];
gets(securityanswer);
cout << "Processing: " << securityanswer << "\n";
cout << username << "\n";
cout << password << "\n";
cout << ssnumber << "\n";
cout << securityquestion << "\n";
cout << securityanswer << "\n";
cout << "Is this information correct? \n";
cout << "1. Yes\n";
cout << "2. No\n";
cout << "Please enter 1 or 2 into the keyboard then press enter.\n";
cin >> informationcorrectchoice;
} while (informationcorrectchoice != 1);
cout << "INFORMATION ACQUIRED...\n";
cout << "NOW PROCESSING...\n";
cout << "Validating...Validating...Validating.\n";
cout << "Login Successful\n";
cout << "Loading...Loading...Loading\n";
cout << "Main Menu Loaded...\n ";
cout << "\t\t\t Main Menu \t\t\t\n";
cout << "Projects \t Files \t Classified \t Schedule\n";
} else{
cout << "Please contact technical support.\n";
}
return 0;
}