我是新手,编了一个程序,却不能运行,请高手看看程序哪里错了.我所想解决的问题是:如果((30x+11)(30y+19))/210余29,计算 z=136529- (30x+11)(30y+19) ,并输出 x,y,z.var
  x,y,z:integer ;
begin
  { TODO -oUser -cConsole Main : Insert code here }
  for x:=0 to 6 do
  begin
      for y:= 0 to 6 do          if ((30x+11)(30y+19) mod 210)=29 then begin
             z=136529- (30x+11)(30y+19)
              writeln('x=',x, ' y=',y,'z=',z);
      end;
  end;
end.

解决方案 »

  1.   

    unit Unit1;interfaceuses
      Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
      Dialogs, StdCtrls, DB, ADODB;type
      TForm1 = class(TForm)
        Button1: TButton;
        ADOQuery1: TADOQuery;
        procedure Button1Click(Sender: TObject);
      private
        { Private declarations }
      public
        { Public declarations }
      end;var
      Form1: TForm1;implementation{$R *.dfm}procedure TForm1.Button1Click(Sender: TObject);
    var
      x,y,z:integer ;
    begin
      { TODO -oUser -cConsole Main : Insert code here }
      for x:=0 to 6 do
      begin
        for y:= 0 to 6 do
        if ((30*x+11)*(30*y+19) mod 210)=29 then
        begin
          z:= 136529- (30*x+11)*(30*y+19);
          writeln('x=',x, ' y=',y,'z=',z);
        end;
      end;
    end;end.
      

  2.   

    多了,多了,你就看这段^_^
    var
      x,y,z:integer ;
    begin
      { TODO -oUser -cConsole Main : Insert code here }
      for x:=0 to 6 do
      begin
        for y:= 0 to 6 do
        if ((30*x+11)*(30*y+19) mod 210)=29 then
        begin
          z:= 136529- (30*x+11)*(30*y+19);
          writeln('x=',x, ' y=',y,'z=',z);
        end;
      end;
    end;
      

  3.   

    var
      x,y,z:integer ;
    begin
      for x:=0 to 6 do
      begin
          for y:= 0 to 6 do          if ((30*x+11)*(30*y+19) mod 210)=29 then begin
                 z:=136529- (30*x+11)*(30*y+19);
                 Label1.Caption:='X:'+inttostr(x)+' Y:'+inttostr(y);
          end;
      end;
    end;
      

  4.   

    xixuemao(俺可是㊣②㈧经儿滴人) :    writeln('x=',x, ' y=',y,'z=',z);     这句没有通过, 结果没有输出,是怎么回事?