If you are using Visual C++ then you can declare a variable and then get the input into it at the end like this:
PHP Code:
int main(){
int i;
//Do stuff....
cin>>i;
return 
0;}