diff options
author | Santo Cariotti <sancn@live.com> | 2017-01-28 19:42:38 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-28 19:42:38 +0100 |
commit | ada1dc01a41785241404bc486713def52344830e (patch) | |
tree | 254fbbac70b0675f80e579207af37569a2ff4841 | |
parent | f94c453302bcfbaafee2af962bec6bdf09770868 (diff) |
Update substring.cc
-rw-r--r-- | substring.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/substring.cc b/substring.cc index 243024c..55aa319 100644 --- a/substring.cc +++ b/substring.cc @@ -14,7 +14,7 @@ int main() void s(int i, int k, int n, char str[]) { - if(i < n){ + if(i < n - k){ if(i < n-k) for(int j = i; j < i+k; j++) cout << str[j]; cout << "\n"; s(i+=1, k, n, str); |