输出用空格分隔

This commit is contained in:
2024-09-26 12:10:53 +08:00
parent d1d0e49bd3
commit 7b0874026d
4 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -27,7 +27,7 @@ int input(book *books) {
void output(book *books, int length) {
for (int i = 0; i < length; i++) {
cout << books[i].id << "\t" << books[i].name << "\t" << fixed << setprecision(2) << books[i].price << endl;
cout << books[i].id << " " << books[i].name << " " << fixed << setprecision(2) << books[i].price << endl;
}
}