Updated various typoes and removed some unneeded code

This commit is contained in:
2020-07-11 13:35:37 -04:00
parent c72754dcf8
commit 0caa043b59
17 changed files with 31 additions and 33 deletions

View File

@@ -31,7 +31,8 @@
//This is the largest number to get the words of
int Problem17::TOP_NUM = 1000;
int Problem17::START_NUM = 1;
int Problem17::STOP_NUM = 1000;
//This function makes a word out of the number passed into it
std::string Problem17::makeWord(int num){
@@ -186,7 +187,7 @@ void Problem17::solve(){
timer.start();
//Step through every element in nums and get the word representations of the numbers
for(int cnt = 1;cnt <= TOP_NUM;++cnt){
for(int cnt = START_NUM;cnt <= STOP_NUM;++cnt){
std::string words = makeWord(cnt); //Get the words of each number in turn
letterCount += countLetters(words); //Add the number of letters to the running tally
}