修复两位小数问题
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user