输出用空格分隔
This commit is contained in:
+1
-1
@@ -21,7 +21,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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user