summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSanto Cariotti <sancn@live.com>2017-01-18 22:20:30 +0100
committerGitHub <noreply@github.com>2017-01-18 22:20:30 +0100
commitaf87fe2015e4634ed48ced8c56a702a0742f6ef9 (patch)
treeb2573568cbee2a8ce52eb896103c06ab75a8a3a8
parentdc3e22ef34f71cc0a58230b77ab79ada421fb1e7 (diff)
Update numeri.cc
-rw-r--r--numeri.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/numeri.cc b/numeri.cc
index 217d6d6..ec2d2d4 100644
--- a/numeri.cc
+++ b/numeri.cc
@@ -33,11 +33,11 @@ int main(void)
file.get(l);
num = l - '0';
if(seq == 0) {
- if(num == a) seq = 1;
+ if(num == a) seq++;
} else if(seq == 1) {
- if(num == b) seq = 2;
+ if(num == b) seq++;
} else if(seq == 2) {
- if(num == c) seq = 3;
+ if(num == c) seq++;
}
if(seq == 3) { tot++; seq = 0; }