Professional Documents
Culture Documents
char alphabet[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'};
int numbers[26] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
18, 19, 20, 21, 22, 23, 24, 25, 26};
return status;
}
int main(){
std::fstream document;
document.open("C:\\Users\\tempo\\Desktop\\Programming\\Misc\\p042_words.txt");
std::string words[5000];
char end = '#', singleChar;
int count = 0;
while (singleChar != end){
document.get(singleChar);
if (singleChar == ',')
count++;
}
// Count indexed properly
float triangle[100];
triangleNumbs(triangle);
int triCount = 0;
// for (int i = 1; i < 10; i++)
// std::cout << triangle[i] << std::endl;
for (int i = 0; i <= count; i++)
if (check(words[i], triangle) == true)
triCount++;