diff --git a/searches/z.algorithm.search.r b/searches/z.algorithm.search.r index 9e3b51f2..bea10011 100644 --- a/searches/z.algorithm.search.r +++ b/searches/z.algorithm.search.r @@ -31,7 +31,8 @@ text <- tolower(readline("Enter text: ")) pattern <- tolower(readline("Enter pattern: ")) matches <- z_algorithm_search(text, pattern) -if (length(matches) > 0) +if (length(matches) > 0) { cat("Pattern found at positions:", matches, "\n") -else - cat("PatternĀ notĀ found.\n") \ No newline at end of file +} else { + cat("Pattern not found.\n") +}