文档 所有空格变为Tab

遗憾的是记事本、word没有这个功能。。。

可以生成exe

 1 #include <cstdio>
 2 #include <cstdlib>
 3 #include <cmath>
 4 #include <cstring>
 5 #include <string>
 6 #include <algorithm>
 7 #include <iostream>
 8 using namespace std;
 9 #define ll long long
10 
11 const double eps=1e-8;
12 const ll inf=1e9;
13 const ll mod=1e9+7;
14 const int maxn=1e5+10;
15 
16 
17 
18 int main()
19 {
20     char c;
21     FILE *in=fopen("in.txt","r");
22     FILE *out=fopen("out.txt","w");
23     while (~(c=fgetc(in)))
24     {
25         if (c==' ')
26             fprintf(out,"\t");
27         else
28             fprintf(out,"%c",c);
29     }
30     fclose(in);
31     fclose(out);
32     return 0;
33 }

猜你喜欢

转载自www.cnblogs.com/cmyg/p/11255355.html
今日推荐