From 56f52b0df858c810c447c27acd1aa699fadc8684 Mon Sep 17 00:00:00 2001 From: tynnp <148174474+tynnp@users.noreply.github.com> Date: Sat, 15 Jun 2024 18:23:17 +0700 Subject: [PATCH] --- .../1. T\303\254m ki\341\272\277m/TKTuanTu4.cpp" | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git "a/UPCODER/C\341\272\245u tr\303\272c d\341\273\257 li\341\273\207u/1. T\303\254m ki\341\272\277m/TKTuanTu4.cpp" "b/UPCODER/C\341\272\245u tr\303\272c d\341\273\257 li\341\273\207u/1. T\303\254m ki\341\272\277m/TKTuanTu4.cpp" index 958d311e..5feadd31 100644 --- "a/UPCODER/C\341\272\245u tr\303\272c d\341\273\257 li\341\273\207u/1. T\303\254m ki\341\272\277m/TKTuanTu4.cpp" +++ "b/UPCODER/C\341\272\245u tr\303\272c d\341\273\257 li\341\273\207u/1. T\303\254m ki\341\272\277m/TKTuanTu4.cpp" @@ -19,7 +19,7 @@ int main() { int ans = sequentialSearch(arr, n, x); if (ans != -1) { - for (int i = 0; i <= ans; i++) + for (int i = 0; i < n; i++) if (arr[i] == arr[ans]) cout << i << " "; } else cout << ans;