Psl/c++ cheat sheet
data types
- int
- double
- char
- long long
input/output
c++: cin/cout
#include <iostream>
using namespace std;
main()
{
int x;
cin >> x;
cout << "answer = " << (x+1) << endl;
}
Remarks: Don't forget the using namespace line. If you do not declare that you need to prefix cin, cout, endl with std, e.g., use std::cin.