#include <cstdlib>
#include <iostream>
#include <cstdlib>
#include <iostream>
#include <string>
#include <fstream>
#include <sstream>
using namespace std;
int main(int argc, char *argv[])
{
int ccounter[32];
string ccombo[38];
string whole_string;
for (ccounter[1]=0; ccounter[1]<27; ccounter[1]++)
{
for (ccounter[2]=0; ccounter[2]<27; ccounter[2]++)
{
for (ccounter[3]=0; ccounter[3]<27; ccounter[3]++)
{
for (ccounter[4]=0; ccounter[4]<27; ccounter[4]++)
{
for (ccounter[5]=0; ccounter[5]<27; ccounter[5]++)
{
for (ccounter[6]=0; ccounter[6]<27; ccounter[6]++)
{
for (ccounter[7]=0; ccounter[7]<27; ccounter[7]++)
{
for (ccounter[8]=0; ccounter[8]<27; ccounter[8]++)
{
for (ccounter[9]=0; ccounter[9]<27; ccounter[9]++)
{
for (ccounter[10]=0; ccounter[10]<27; ccounter[10]++)
{
for (ccounter[11]=0; ccounter[11]<27; ccounter[11]++)
{
for (ccounter[12]=0; ccounter[12]<27; ccounter[12]++)
{
for (ccounter[13]=0; ccounter[13]<27; ccounter[13]++)
{
for (ccounter[14]=0; ccounter[14]<27; ccounter[14]++)
{
for (ccounter[15]=0; ccounter[15]<27; ccounter[15]++)
{
for (ccounter[16]=0; ccounter[16]<27; ccounter[16]++)
{
for (ccounter[17]=0; ccounter[17]<27; ccounter[17]++)
{
for (ccounter[18]=0; ccounter[18]<27; ccounter[18]++)
{
for (ccounter[19]=0; ccounter[19]<27; ccounter[19]++)
{
for (ccounter[20]=0; ccounter[20]<27; ccounter[20]++)
{
for (ccounter[21]=0; ccounter[21]<27; ccounter[21]++)
{
for (ccounter[22]=0; ccounter[22]<27; ccounter[22]++)
{
for (ccounter[23]=0; ccounter[23]<27; ccounter[23]++)
{
for (ccounter[24]=0; ccounter[24]<27; ccounter[24]++)
{
for (ccounter[25]=0; ccounter[25]<27; ccounter[25]++)
{
for (ccounter[26]=0; ccounter[26]<27; ccounter[26]++)
{
for (ccounter[27]=0; ccounter[27]<27; ccounter[27]++)
{
for (ccounter[28]=0; ccounter[28]<27; ccounter[28]++)
{
for (ccounter[29]=0; ccounter[29]<27; ccounter[29]++)
{
for (ccounter[30]=0; ccounter[30]<27; ccounter[30]++)
{
for (ccounter[31]=0; ccounter[31]<27; ccounter[31]++)
{
for (ccounter[32]=0; ccounter[32]<27; ccounter[32]++)
{
for (ccounter[32]=0; ccounter[32]<27; ccounter[32]++)
{
for (int i=1; i<33; i++)
{
if (ccounter[i]==0)
{
ccombo[i]=" ";
}
if (ccounter[i]==1)
{
ccombo[i]="a";
}
if (ccounter[i]==2)
{
ccombo[i]="b";
}
if (ccounter[i]==3)
{
ccombo[i]="c";
}
if (ccounter[i]==4)
{
ccombo[i]="d";
}
if (ccounter[i]==5)
{
ccombo[i]="e";
}
if (ccounter[i]==6)
{
ccombo[i]="f";
}
if (ccounter[i]==7)
{
ccombo[i]="g";
}
if (ccounter[i]==8)
{
ccombo[i]="h";
}
if (ccounter[i]==9)
{
ccombo[i]="i";
}
if (ccounter[i]==10)
{
ccombo[i]="j";
}
if (ccounter[i]==11)
{
ccombo[i]="k";
}
if (ccounter[i]==12)
{
ccombo[i]="l";
}
if (ccounter[i]==13)
{
ccombo[i]="m";
}
if (ccounter[i]==14)
{
ccombo[i]="n";
}
if (ccounter[i]==15)
{
ccombo[i]="o";
}
if (ccounter[i]==16)
{
ccombo[i]="p";
}
if (ccounter[i]==17)
{
ccombo[i]="q";
}
if (ccounter[i]==18)
{
ccombo[i]="r";
}
if (ccounter[i]==19)
{
ccombo[i]="s";
}
if (ccounter[i]==20)
{
ccombo[i]="t";
}
if (ccounter[i]==21)
{
ccombo[i]="u";
}
if (ccounter[i]==22)
{
ccombo[i]="v";
}
if (ccounter[i]==23)
{
ccombo[i]="w";
}
if (ccounter[i]==24)
{
ccombo[i]="x";
}
if (ccounter[i]==25)
{
ccombo[i]="y";
}
if (ccounter[i]==26)
{
ccombo[i]="z";
}
}
whole_string="" + ccombo[32] + "" + ccombo[31] + "" + ccombo[30] + "" + ccombo[29] + "" + ccombo[28] + "" + ccombo[27] + "" + ccombo[26] + "" + ccombo[25] + "" + ccombo[24] + "" + ccombo[23] + "" + ccombo[22] + "" + ccombo[21] + "" + ccombo[20] + "" + ccombo[19] + "" + ccombo[18] + "" + ccombo[17] + "" + ccombo[16] + "" + ccombo[15] + "" + ccombo[14] + "" + ccombo[13] + "" + ccombo[12] + "" + ccombo[11] + "" + ccombo[10] + "" + ccombo[9] + "" + ccombo[8] + "" + ccombo[7] + "" + ccombo[6] + "" + ccombo[5] + "" + ccombo[4] + "" + ccombo[3] + "" + ccombo[2] + "" + ccombo[1] + "\n";
ofstream writer("hi.count", ios::app);
writer << whole_string;
}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
system("PAUSE");
return EXIT_SUCCESS;
}
i kno this code works the only problem is that it will take way to long to finish. basically what's happening in this code is each nested "for" loop represents a 26 character long digit place. when the program starts the most nested "for" loop goes up till it reaches 26 then the second for loop goes up one till it gets to 26 and so on and so forth. every time the first for loop goes up one i add letter assignments to each digit place then i combine all the digit places to make a string that i write to the bottom of a file every time the first digit place goes up.
i wanna kno if i can get the same output but without taking as much time to complete it
This post has been edited by ben104: 05 January 2009 - 02:33 PM

New Topic/Question
Reply




MultiQuote






|