read from keyboard c++ code example
Example 1: get data from terminal c++
int i;
cout << "Please enter an integer value: ";
cin >> i;
Example 2: c++ output
#include <iostream>
int main(){
std::cout << "Hello World!" << std::endl; // prints "Hello World"
}