获取键盘输入
键盘输入一个int
int data = 0;
cout << "请输入int数据:";
cin >> data; //键盘输入, 根据data类型自动判断输入
cout << "data = " << data << endl;
键盘输入两个int
int d1 = 0, d2 = 0;
cout << "请输入两个int:";
cin >> d1 >> d2;
cout << "d1 = " << d1 << ", d2 = " << d2 << endl;
标签:02,cout,int,d2,键盘输入,获取,data From: https://www.cnblogs.com/mzx233/p/17723118.htmlcin输入数据可以跳过空格和回车