TA release HW1

This commit is contained in:
unlockable
2024-05-02 21:49:44 +08:00
parent 751989310c
commit 2bd8c009b5
17 changed files with 598 additions and 0 deletions

18
1/exp1/exp1_1.cpp Normal file
View File

@@ -0,0 +1,18 @@
#include "stdio.h"
int main() {
FILE *infile ,*outfile;
int i;
int *buffer;
buffer = new int[2];
infile = fopen("a.in", "rb");
fread(buffer, 4, 2, infile);
fclose(infile);
outfile = fopen("a.out", "wb");
fwrite(buffer, 4, 2, outfile);
fclose(outfile);
scanf("%d", &i);
i = i + 10;
printf("%d", i);
return 0;
}