Mercurial > codedump
changeset 43:3487aa65ca56
Update win95kg.cpp
committer: GitHub <noreply@github.com>
author | Paper <37962225+mrpapersonic@users.noreply.github.com> |
---|---|
date | Wed, 30 Jun 2021 02:40:58 -0400 |
parents | 1c81c5106b59 |
children | 190ac0f669c6 |
files | win95kg.cpp |
diffstat | 1 files changed, 2 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/win95kg.cpp Wed Jun 30 02:40:02 2021 -0400 +++ b/win95kg.cpp Wed Jun 30 02:40:58 2021 -0400 @@ -98,7 +98,7 @@ int e() { int first_digits; int last_digit; - int second_segment = 5; + int second_segment; int sum = 1; while (sum % 7 != 0) { sum = 0; @@ -108,10 +108,9 @@ last_digit = rand() % 10; } std::string second_segment_p1 = (std::to_string(first_digits) + std::to_string(last_digit)); - second_segment = std::stoi(second_segment_p1); for(char &c :second_segment_p1) { sum += c - '0'; } } - return second_segment; + return std::stoi(second_segment_p1); }