diff --git a/homework1/test1.cpp b/homework1/test1.cpp index e4b4d3e..f41f3ae 100644 --- a/homework1/test1.cpp +++ b/homework1/test1.cpp @@ -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; } } diff --git a/homework1/test2.cpp b/homework1/test2.cpp index 12ec9c1..c56cd33 100644 --- a/homework1/test2.cpp +++ b/homework1/test2.cpp @@ -37,7 +37,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; } } diff --git a/homework1/test3.cpp b/homework1/test3.cpp index 0b52054..2effad1 100644 --- a/homework1/test3.cpp +++ b/homework1/test3.cpp @@ -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; } } diff --git a/homework1/test4.cpp b/homework1/test4.cpp index 9542a52..babaa37 100644 --- a/homework1/test4.cpp +++ b/homework1/test4.cpp @@ -47,7 +47,7 @@ void input(book *books, int n) { void output(book_and_number books_and_number) { cout << books_and_number.number_of_books << endl; for (int i = 0; i < books_and_number.number_of_books; i++) { - cout << books_and_number.books[i].id << "\t" << books_and_number.books[i].name << "\t" << fixed << + cout << books_and_number.books[i].id << " " << books_and_number.books[i].name << " " << fixed << setprecision(2) << books_and_number.books[i].price << endl; }