mirror of
https://bitbucket.org/Mattrixwv/projecteulercpp.git
synced 2025-12-06 17:13:59 -05:00
Updated various typoes and removed some unneeded code
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user