/*清除缓存cin.sync();*/
#include <iostream>
using namespace std;
int main () {
  char first, second;

  cout << "Please, enter a word: ";
  first=cin.get();
  cin.sync();
  cout << "Please, enter another word: ";
  second=cin.get();

  cout << "The first word began by " << first << endl;
  cout << "The second word began by " << second << endl;

  return 0;
}

相关文章:

  • 2021-08-18
  • 2021-08-04
  • 2021-11-08
  • 2021-05-08
  • 2021-08-19
  • 2022-02-07
  • 2022-01-09
  • 2022-01-29
猜你喜欢
  • 2021-12-02
  • 2022-12-23
  • 2021-08-08
  • 2021-11-21
  • 2021-11-21
  • 2021-11-21
  • 2021-11-21
相关资源
相似解决方案