1,221
社区成员
发帖
与我相关
我的任务
分享
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "Unit1.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Btn_1Click(TObject *Sender)
{
AnsiString tmp1, tmp2, MID;
while (tmp1.Length()>3)
{
tmp2= tmp1.SubString(1,3);
tmp1.Delete(1,3);
MID=MID+char(35+StrToInt(tmp2)*26/999)+tmp2;
}
}
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
#ifndef Unit1H
#define Unit1H
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
//---------------------------------------------------------------------------
class TForm1 : public TForm
{
__published: // IDE-managed Components
TButton *Btn_1;
void __fastcall Btn_1Click(TObject *Sender);
private: // User declarations
public: // User declarations
__fastcall TForm1(TComponent* Owner);
};
//---------------------------------------------------------------------------
extern PACKAGE TForm1 *Form1;
//---------------------------------------------------------------------------
#endif
while (tmp1.Length()>3)
{
tmp2= tmp1.SubString(1,3);
tmp1.Delete(1,3);
MID=MID+char(35+StrToInt(tmp2)*26/999)+tmp2;
}