summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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; }