‘cin’ is used to take input from keyboard and ‘cout’ is used to display output on the screen. ‘iostream’ which stands for input-output stream is a header file which contains ‘cin’ and ‘cout’. A string can be printed on the output screen using ‘cout’ and placing inside quotation marks ” “.
#include<iostream>
using namespace std;
int main() {
int a,b;
cout<<"Enter two numbers ";
cin>>a>>b;
cout<<"Two numbers are "<<a<<endl<<b;
return 0;
}