Basic concept of C++Input is :
- User inserting a value
- The value will saved in variable
#include<iostream>After compiled and run. The print out of it is at below
#include<stdlib.h>
using namespace std;
int main()
{
int a;
cout<<"Insert Your Age : ";
cin>>a;
cout<<endl;
cout<<endl;
cout<<"Your Age is "<<a;
cout<<endl;
system("pause");
}
Below the explain of syntax :
cin>>a is use to inserting a value form keyboard to the variable.
For other syntax, you can read in Printing Text C++ Using COUT Syntax [Basic Lesson] article.
Its a simple example of C++ Input. For other example, you can download here.
Paper 4Share - C++ Input