代码环境: Windows10——VS2022——cpp 场景: 当用户不合法输入时检查出问题并反馈: int i=0; cout << "英里转公里输入“1”,公里转英里输入“2”\n"; cin >> i; while ((i != 1) && (i !=