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:
@@ -52,18 +52,13 @@ void Problem1::solve(){
|
||||
for(uint64_t cnt = 1;cnt <= MAX_NUMBER;++cnt){
|
||||
//If either 3 or 5 divides it evenly then add it to the vector
|
||||
if((cnt % 3) == 0){
|
||||
numbers.push_back(cnt);
|
||||
fullSum += cnt;
|
||||
}
|
||||
else if((cnt % 5) == 0){
|
||||
numbers.push_back(cnt);
|
||||
fullSum += cnt;
|
||||
}
|
||||
}
|
||||
|
||||
//Get the sum of all numbers
|
||||
for(uint64_t num : numbers){
|
||||
fullSum += num;
|
||||
}
|
||||
|
||||
//Stop the timer
|
||||
timer.stop();
|
||||
|
||||
@@ -75,7 +70,6 @@ void Problem1::solve(){
|
||||
void Problem1::reset(){
|
||||
Problem::reset();
|
||||
fullSum = 0;
|
||||
numbers.clear();
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user