07 May 2009

Program To Get The List Of All Possible Combinations Of Length 6 Formed By Letters (a To z)

//0
#include <iostream>
#include <fstream>

//1
using namespace std;

//2  
int main ()
{
// creating a text output-file
    ofstream output;
    output.open("output.txt");  
 
// filling the text files
    for (int a=1; a<=26; a++)
         for (int b=1; b<=26; b++)
             for (int c=1; c<=26; c++)
                 for (int d=1; d<=26; d++)
                     for (int e=1; e<=26; e++)
                         for (int f=1; f<=26; f++)
                                 output << char(a+96) << char(b+96) << char(c+96) << char(d+96) << char(e+96) << char(f+96)<< endl;
// pause the system
system ("PAUSE");

return 0;
}
#


What can you do with the new Windows Live? Find out