求C语言代码

来源:百度知道 编辑:UC知道 时间:2024/05/15 17:03:21
在c语言中打开一个英文文档,用Si(i<=文章句子数)代替文章中的各句子。
我研究一下,不是很好懂,不过非常感谢大哥

我对语言不是很精通,下边是我上学时候的作业,里面有置换法,你可以借鉴一下。编程高手别笑我哦。

#include <iostream.h>
#include <stdio.h>
#include <stdlib.h>
#include <conio.h>
#include <string.h>
class Ar1 //算法1
{private:char ch;
public:void en()
{while(ch=getchar())
{ if ((ch>='a'&&ch<='z')||(ch>='A'&&ch<='Z'))
{ch=ch+7;
if(ch>'Z'&&ch<='Z'+7||ch>'z')
ch=ch-26;
printf("%c",ch);
}
else
if(ch!='\n')
printf("%c",ch);
else
break;
}
}
void un()
{while(ch=getchar())
{if ((ch>='a'&&ch<='z')||(ch>='A'&&ch<='Z'))