From 34720ae2d30a8f1397e61537919ad89ec0646610 Mon Sep 17 00:00:00 2001 From: Harsh Singh <94822101+harshsingh510@users.noreply.github.com> Date: Sat, 19 Nov 2022 02:54:39 +0530 Subject: [PATCH] fix: stairs pattern not printing slash (#2111) when we propose 2 backslash then it doesn't take it as a comment and gets printed Co-authored-by: David Leal --- others/stairs_pattern.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/others/stairs_pattern.cpp b/others/stairs_pattern.cpp index a3b8b0a44..681ab088b 100644 --- a/others/stairs_pattern.cpp +++ b/others/stairs_pattern.cpp @@ -16,7 +16,7 @@ where number of pairs line is given by user /** main function */ int main() { int l, st = 2, x, r, z, n, sp; - std::cout << "enter Index "; + std::cout << "Enter number of pair - "; std::cin >> x; z = x; for (r = 1; r <= x; r++) { @@ -26,7 +26,7 @@ int main() { std::cout << " "; } for (l = 1; l <= st; l++) { - std::cout << "*"; + std::cout << "\\*"; } std::cout << std::endl; }