#include "stdafx.h"
#include <stdio.h>
#include <stdlib.h>
#include <iostream>
using namespace std;
int main()
FILE *stream1, *stream2;
freopen_s(&stream1, "F:\\input.txt", "r");
freopen_s(&stream2, "F:\\output.txt", "w");
int n;
fscanf_s(stream1, "%d", &n);//从stream1中读取一个int
fprintf(stream2, "%d", n); //将int输出到stream2
fclose(stream1);
fclose(stream2);
return 0;
}
#include <stdio.h>
#include <stdlib.h>
#include <iostream>
using namespace std;
int main()
FILE *stream1, *stream2;
freopen_s(&stream1, "F:\\input.txt", "r");
freopen_s(&stream2, "F:\\output.txt", "w");
int n;
fscanf_s(stream1, "%d", &n);//从stream1中读取一个int
fprintf(stream2, "%d", n); //将int输出到stream2
fclose(stream1);
fclose(stream2);
return 0;
}