diff options
Diffstat (limited to 'test.cpp')
-rw-r--r-- | test.cpp | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/test.cpp b/test.cpp deleted file mode 100644 index fecf9cd..0000000 --- a/test.cpp +++ /dev/null | |||
@@ -1,27 +0,0 @@ | |||
1 | #include <iostream> | ||
2 | #include <fstream> | ||
3 | #include <string> | ||
4 | #include <cstdio> | ||
5 | using namespace std; | ||
6 | |||
7 | int main() | ||
8 | { | ||
9 | fstream fr,fw; | ||
10 | fr.open("data/delta_T.txt",ios::in); | ||
11 | fw.open("fuck1.txt",ios::out); | ||
12 | int year; | ||
13 | string s; | ||
14 | char sout[1024]; | ||
15 | double a[4]; | ||
16 | fw<<"double d={"<<endl; | ||
17 | while(getline(fr,s)) | ||
18 | { | ||
19 | sscanf(s.c_str(),"%d%lf%lf%lf%lf",&year,&a[0],&a[1],&a[2],&a[3]); | ||
20 | sprintf(sout,"{%d,\t%lf,\t%lf,\t%lf,\t%lf},",year,a[0],a[1],a[2],a[3]); | ||
21 | fw<<sout<<endl; | ||
22 | } | ||
23 | fw<<"};"<<endl; | ||
24 | fr.close(); | ||
25 | fw.close(); | ||
26 | return 0; | ||
27 | } | ||