实验六完成

This commit is contained in:
2024-12-22 01:24:50 +08:00
parent 1fba558d43
commit 04e9780b47
2 changed files with 21 additions and 21 deletions
+1 -1
View File
@@ -13,7 +13,7 @@ int seqSearch(vector<T> l,T value) {
bool found = false;
int index = 0;
for (int i=0; i<l.size(); i++) {
cout<<"正在顺序查找第"<<i<<"位元素"<<"其值为"<<l.at(i)<<endl;
cout<<"正在顺序查找第"<<i+1<<"位元素"<<"其值为"<<l.at(i)<<endl;
if (l.at(i) == value) {
found = true;