level 1
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
Edit1: TEdit;
Button1: TButton;
procedure Button1Click(Sender: TObject);
procedure Edit1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
var
n:Integer;
begin
n:=StrToInt(Edit1.Text) ;
if ((n mod 7 = 0) and (n mod 6=1)and(n mod 5=1)and(n mod 4=3)and(n mod 3=1)and(n mod 2=1))then
else
begin
n:= n+1
end;
Edit1.Text:= IntToStr(n)
end;
procedure TForm1.Edit1Click(Sender: TObject);
begin
Edit1.Text:='';
end;
end.
弄完了之后要点N多下才出答案,怎么改才能让它点一下就出答案,本人刚解除编程,请赐教,谢谢
2017年03月18日 01点03分

