头文件 #include<iostream>
输入:
cout << 表达式1 << 表达式2 << ...
如 cout << "hello!\n";
换行在这里也可以是 cout << "hello!" << endl ;
输出:
cin >> "a + b =" >> a + b ;
完整代码:
#include<iostream>
using namespace std;
int main() {
int year ;
cout << "Enter the year : ";
cin >> year ;
cout << endl << "The year is : " << year << endl;
}