#include <iostream>
usingnamespace std;
int main()
{
int y;
cout <<"Try cout !!\n\n";
cout <<"Input number : ";
cin >> y;
cout <<"\nYour number : "<< y <<"";
getchar();
return 0;
}
This is my code, and... when I compile and run, CMD open, and it request an input, and it make output "Your number : 7"(I inputed 7), but it suddenly close, like there is no getchar
I put getchar();, but it doesn't work.
Please help me