Often you need to redirect the input and output when the test code, the following is a simple example.
freopen ("input.txt", "r", stdin);
int n;
cin>>n;
cout<<"n is "<<n<<endl;
Often you need to redirect the input and output when the test code, the following is a simple example.
freopen ("input.txt", "r", stdin);
int n;
cin>>n;
cout<<"n is "<<n<<endl;