C-sources:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
#include<stdio.h>
int main()
{
FILE * fp; //定义一个文件
if (fp == NULL)
{
printf ( "ERROR!\N" );
return ;
}
int TwoPointSignal[1000];
int n,k=0,j;
while (! feof (fp))
{
fscanf (fp, "%d" ,&n);
TwoPointSignal[k]=n;
k++;
}
fclose (fp);
for (j=0;j<15;j++)
{
printf ( "%d\t" ,TwoPointSignal[j]);
if (j%8==0)
printf ( "\n" );
}
return 0;
}
|
p5.txt:
结果图: