修复把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
BIN
View File
Binary file not shown.
+2 -2
View File
@@ -25,8 +25,8 @@ int main()
} }
} }
// output // output
cout << i + 1 << endl; cout << i << endl;
for (int j = 0; j <= i; j++) for (int j = 0; j < i; j++)
{ {
cout << books[j].no << "\t" << books[j].name << "\t" << fixed << setprecision(2) << books[j].price << endl; cout << books[j].no << "\t" << books[j].name << "\t" << fixed << setprecision(2) << books[j].price << endl;
} }