练习1.3
#include <iostream>
using namespace std;
int main()
{
cout<<"hello,world!"<<endl;
return 0;
}
练习1.4
#include <iostream>
using namespace std;
int main()
{
cout<<"Enter two number:"<<endl;
int a=0,b=0;
cin>>a>>b;
cout<<"The product of"<<a<<" and "<<b<<" is "<< a*b <<endl;
return 0;
}
1.6
it is illegal.只有一个std::cout输出语句,应该将v1 v2后的分号去掉。这是因为第二行的<<左侧为";",意味着左侧输入为空,而不管输入输出运算符,左侧都要有对象,所以无法执行,不合法.