Website Summary Files Commits Branches @commit @diff @stats
path: root / Sem. 14 / task7.cpp
diff options
context:
space:
mode:
Commit838aabd23830835c4cbf8d6bce5db176636a74d6 (patch)
Author
 Angel Dimitriev <achi_d@abv.bg>
2021-01-09 16:40:27 -0500
Committer
 GitHub <noreply@github.com>
2021-01-09 16:40:27 -0500
Filesb4f51e5e618c2a00270853349cab3e5d8f3e7c83 /Sem. 14/task7.cpp
Introduction_to_programming_FMI-838aabd23830835c4cbf8d6bce5db176636a74d6.tar
Introduction_to_programming_FMI-838aabd23830835c4cbf8d6bce5db176636a74d6.tar.gz
Introduction_to_programming_FMI-838aabd23830835c4cbf8d6bce5db176636a74d6.zip
Parentf5a305277efea1adfedbe8bc993ec1ea2ec4c8d0 (diff)
Update task7.cpp
1 files changed, 2 insertions, 1 deletions
-rw-r--r--Sem. 14/task7.cpp3
diff --git a/Sem. 14/task7.cpp b/Sem. 14/task7.cpp
index abe8458..726a0f2 100644
--- a/Sem. 14/task7.cpp
+++ b/Sem. 14/task7.cpp
@@ -29,7 +29,8 @@ int fillWords(const char* str, char words[MAXLEN][MAXLEN])
currentWordCursorInMatrix++;
}
}
-
+ if(str[len-1] != ' ')
+ count++; //the last word;
return count;
}