Making a science fair project

Hello all. I am trying to make a program that will cycle through all the possible solutions until it reaches the same word as the inputted word. Here is my code:

#include "stdafx.h"

int main()
{

string Pass2;
char Pass[10];
char MPass[10];
cout << "> ";
cin >> Pass; //takes in input for pass

double x = strlen(Pass);
double max = pow(x, 2);
char Alpha[26] = {'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'};
cout << "-------------------------------------------------------------------------" << endl;
cout << "Estimated MAX Possible: " << (max)*26 << endl;
cout << "Estimated MAX Time Over Internet (30ms): " << (max * 30) << "S" << endl;
cout << "Continue? Press ENTER." << endl;
cout << "-------------------------------------------------------------------------" << endl;
cin.get();
cin.ignore();
for (int i = 0; i <= x; i++)
{
if (i == x)
Pass[i] = '\0';
else
continue;
}
for (int i = 0; i <= x; i++)
{
if (i != x)
MPass[i] = Alpha[0];
else
MPass[i] = '\0';
}
int i = 0, a = 0, b = 0, c = 0, d = 0, e = 0;
while (true)
{
MPass[0] = Alpha[i];
if (i == 25)
{
i = 0;
MPass[1] = Alpha[a];


if (a == 25)
{
a = 0;
MPass[2] = Alpha[b];

if (b == 25)
{
b = 0;
MPass[3] = Alpha[c];

if (c == 25)
{
c = 0;
MPass[4] = Alpha[d];

d++;
if (MPass[0] == Pass[0] && MPass[1] == Pass[1] && MPass[2] == Pass[2] && MPass[3] == Pass[3] && MPass[4] == Pass[4])
break;
}
c++;
if (MPass[0] == Pass[0] && MPass[1] == Pass[1] && MPass[2] == Pass[2] && MPass[3] == Pass[3] && MPass[4] == Pass[4])
break;
}
b++;
if (MPass[0] == Pass[0] && MPass[1] == Pass[1] && MPass[2] == Pass[2] && MPass[3] == Pass[3] && MPass[4] == Pass[4])
break;
}
a++;
if (MPass[0] == Pass[0] && MPass[1] == Pass[1] && MPass[2] == Pass[2] && MPass[3] == Pass[3] && MPass[4] == Pass[4])
break;
}
i++;
if (MPass[0] == Pass[0] && MPass[1] == Pass[1] && MPass[2] == Pass[2] && MPass[3] == Pass[3] && MPass[4] == Pass[4])
break;
for (int g = 0; g < x; g++)
cout << MPass[g];
cout << " | ";
}
cout << endl << "-----------------------------------------------------------------" << endl;
for (int g = 0; g < x; g++)
cout << MPass[g];

if (MPass[0] == Pass[0] && MPass[1] == Pass[1] && MPass[2] == Pass[2] && MPass[3] == Pass[3] && MPass[4] == Pass[4] && MPass[5] == Pass[5] && MPass[6] == Pass[6] && MPass[7] == Pass[7] && MPass[8] == Pass[8] && MPass[9] == Pass[9] && MPass[10] == Pass[10])
cout << "\ndone!";

cin.get();
cin.ignore();
}


Thanks in advance!
http://puu.sh/lEMeX/f9f530b39f.png Should output like this
Topic archived. No new replies allowed.