我是新手,编了一个程序,却不能运行,请高手看看程序哪里错了.我所想解决的问题是:如果((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.
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.
解决方案 »
- 关于DevExpress问题:为什么菜单上的图标都被拉大,影响美观?
- 【泰坦散分贴】亮剑生了有3天了,按照惯例,摆下三朝酒,欢迎捧场!!!哈哈
- DELPHI与WORD怎样连用 急~急~
- 100分求助。老问题:TADOQuery取出相应名称字段的字段类型AsFloat的精度问题,希望给出正确并且合理的解决方式!分不够可以再加!
- TADOConnection.OpenSchema如何知道某字段是否自增?
- DBGRID焦点离开某一行将触发那一事件?注意是某一行,不是某一列!
- 救命啊!!!!
- 如何获取屏幕的宽、高,使窗体等于屏幕的大小?
- 在配ODBC的数据源时到使用用户登录ID和密码SQL Server 验证下一步时的问题
- 我怎么老买不到票呢?
- 不好意思求一条SQL语句
- 怎样能让一个Buton组件DrawGrid表格界面上任意拖放.
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.
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;
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;