level 1
09毕飞鸟
楼主
# include <iostream>
# include <cstring>
# include <fstream>
using main()
{
char C;
ifstream infile ("奥巴马演讲稿.txt")
ofstream outfile ("复制文本.txt")
if(!infile ||!outfile)
{
cout<<"文件打开失败!"<<endl;
return 1;
}
int k=0;
char A[20000];
while (!infile.eof())
{
infile get(c);
outfile put(c);
A[k]=C;
k++;
}
infile close();
outfile close();
A[k+1]='\0';
ofstream outfile 2 ("文件倒序.txt");
if(!outfile 2)
{
cout<<"文件打开失败!"<<endl;
return 1;
}
for(int P=k;P>=0;p--)
{
outfile 2<<A[p];
}
outfile 2 close ();
char * word [5000];
int j=0;
int count=0;
for(int t=0;t<strlen(A);t++)
{
if(A[t]>='A'&&A[t]<='Z')
{
A[t]=A[t]
+3
2;
}
}
for(int i=0;i<strlen(A);i++)
{
if(A[i]>='a'&&A[i]<='Z')
{
if(i==strlen(A)-1)
{
word[count]=new char[20];
for(int k=j;k<=i;k++)
{
word[count][k-j]=A[k];
2010年11月18日 11点11分
1
# include <cstring>
# include <fstream>
using main()
{
char C;
ifstream infile ("奥巴马演讲稿.txt")
ofstream outfile ("复制文本.txt")
if(!infile ||!outfile)
{
cout<<"文件打开失败!"<<endl;
return 1;
}
int k=0;
char A[20000];
while (!infile.eof())
{
infile get(c);
outfile put(c);
A[k]=C;
k++;
}
infile close();
outfile close();
A[k+1]='\0';
ofstream outfile 2 ("文件倒序.txt");
if(!outfile 2)
{
cout<<"文件打开失败!"<<endl;
return 1;
}
for(int P=k;P>=0;p--)
{
outfile 2<<A[p];
}
outfile 2 close ();
char * word [5000];
int j=0;
int count=0;
for(int t=0;t<strlen(A);t++)
{
if(A[t]>='A'&&A[t]<='Z')
{
A[t]=A[t]
+3
2;
}
}
for(int i=0;i<strlen(A);i++)
{
if(A[i]>='a'&&A[i]<='Z')
{
if(i==strlen(A)-1)
{
word[count]=new char[20];
for(int k=j;k<=i;k++)
{
word[count][k-j]=A[k];