修复把0,0,0也输出的问题

This commit is contained in:
2024-09-25 21:20:08 +08:00
parent 6c783412ad
commit bd3b0aeaa8
2 changed files with 2 additions and 2 deletions
+2 -2
View File
@@ -25,8 +25,8 @@ int main()
}
}
// output
cout << i + 1 << endl;
for (int j = 0; j <= i; j++)
cout << i << endl;
for (int j = 0; j < i; j++)
{
cout << books[j].no << "\t" << books[j].name << "\t" << fixed << setprecision(2) << books[j].price << endl;
}