diff options
| author | Soikk | 2021-08-31 03:04:55 +0200 |
|---|---|---|
| committer | Soikk | 2021-08-31 03:04:55 +0200 |
| commit | 1fc291bc27c00ee9c949df8cc1fda341afdf0c31 (patch) | |
| tree | dd9c6709e4085646cf52c71d409f3272e2f1a750 /wordfinder.c | |
| parent | 2ea10ddc44a591b91d8af16a7a8bbc2b83b53362 (diff) | |
| download | soikk-wordfinder-1fc291bc27c00ee9c949df8cc1fda341afdf0c31.tar.xz soikk-wordfinder-1fc291bc27c00ee9c949df8cc1fda341afdf0c31.tar.zst | |
Update wordfinder.c
Updated it so that when the word is only found on one line, it writes "line" in the singular
Diffstat (limited to 'wordfinder.c')
| -rw-r--r-- | wordfinder.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/wordfinder.c b/wordfinder.c index e4849bc..532901f 100644 --- a/wordfinder.c +++ b/wordfinder.c @@ -66,7 +66,7 @@ void printLineData(lineData lineData){ } void printData(Data data){ - printf("Found \"%s\" in %d lines:\n", data.name, data.lines); + printf("Found \"%s\" in %d line%s:\n", data.name, data.lines, (data.lines>1)?"s":""); for(int i = 0; i < data.lines; i++){ printf("\t-At line %d:\n", data.lineList[i].lineNumber); printLineData(data.lineList[i]); |
