修复两位小数问题

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