主要是根据C++来说 发现\b退格的用处 以及const的应用 写博客有点累啊
// bondini.cpp -- using escape sequences
#include <iostream>
int main()
{
using namespace std;
cout.setf(ios_base::fixed, ios_base::floatfield);//fixed-point
cout << "Please enter your height in inches: ___\b\b\b ";//这个体现的就是退格的思想
int inch; double infeet;
cin >> inch;
const int convert = 12;
infeet = (double)inch / convert;
cout << "This person height is " << inch << endl
<< infeet << endl;
return 0;
}
运行结果
对比一下