From 166bc870aeaec374dacedc4d01202149f9fb8980 Mon Sep 17 00:00:00 2001 From: Varun <55014907+varunsahu29@users.noreply.github.com> Date: Thu, 1 Oct 2020 23:14:42 +0530 Subject: [PATCH] Update The_Next_Palindrome.cpp --- The_Next_Palindrome.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/The_Next_Palindrome.cpp b/The_Next_Palindrome.cpp index c1ad600..44e3bc3 100644 --- a/The_Next_Palindrome.cpp +++ b/The_Next_Palindrome.cpp @@ -58,10 +58,9 @@ int main() for ( ; i >= 0; --i, ++j) { if (k[i] < k[j]) - k[j] = k[i]; - } - + k[j] = k[i]; + } cout << k << endl; } return 0; -} \ No newline at end of file +}