Input and Output function in C++ language

In this program i will show you Input and Output function in C++ programming language.



"CIN" used to get input from user in C++ language.

 "COUT" used to show Output after running a program.


Program in C++ language using DevC++:



Output:



Output and Input function Program Source code:


#include <iostream>
using namespace std;

int main(int argc, char** argv) {
string a; //declare a variable
cout<<"Enter your name: "; //Output function : Show output:Enter your name 
cin>>a; //Input function: Get input from user 
cout<<a; // Output function: Show output in a variable:
}



Comments