freopen

#include<iostream>
#include<stdlib.h>
using namespace std;
int main()
{
    freopen("123.txt","r",stdin);
    freopen("abc.txt","w",stdout);
    int a;
    cin>>a;
    cout<<a*2<<endl;
    system("pause");
    return 0;
}

 

你可能感兴趣的:(open)