10.数据输入
2020-12-12 本文已影响0人
lxr_
#include<iostream>
using namespace std;
int main()
{
string str = "hello";
cout << str << endl;
cin >> str;
cout << str << endl;
int a = 5;
int b = 2;
float c = a / (float)b;//如果不进行强制转换会可能会丢失小数位数据
cout << c << endl;
system("pause");
return 0;
}