#include <iostream>
using namespace std;
main()
{ int a=1;//不赋值,会是一些乱码
float b=2;
double c=3;
cout<<a<<'\n';// new line 要加上单引号
cout<<b<<endl;
cout<<"the sum of a+b is";// notice
cout<<a+b; //can do some operation
cout<<c;
cout<<a<<b<<c;//可以连着写
cin>>a>>b>>c;
}
//the different of\n and endl is that endl refrese buffer
转载于:https://www.cnblogs.com/zhanghui0910/archive/2009/02/16/1391661.html