英语翻译2、vara,b:integer;functionwork(a,b:integer):integer;beginif a mod b 0 thenwork := work(b,a mod b)elsework := b;end;beginread(a,b);writeln(work(a,b));end.输入:2012输出:___4____给我逐字逐句地翻译另外帮我解释这道题

来源:学生作业帮助网 编辑:作业帮 时间:2024/11/17 18:22:48

英语翻译2、vara,b:integer;functionwork(a,b:integer):integer;beginif a mod b 0 thenwork := work(b,a mod b)elsework := b;end;beginread(a,b);writeln(work(a,b));end.输入:2012输出:___4____给我逐字逐句地翻译另外帮我解释这道题
英语翻译
2、var
a,b:integer;
functionwork(a,b:integer):integer;
begin
if a mod b 0 then
work := work(b,a mod b)
else
work := b;
end;
begin
read(a,b);
writeln(work(a,b));
end.
输入:2012
输出:___4____
给我逐字逐句地翻译
另外帮我解释这道题中work的意思 read的意思

英语翻译2、vara,b:integer;functionwork(a,b:integer):integer;beginif a mod b 0 thenwork := work(b,a mod b)elsework := b;end;beginread(a,b);writeln(work(a,b));end.输入:2012输出:___4____给我逐字逐句地翻译另外帮我解释这道题
var
a, b: integer;
function work(a, b: integer): integer; //求a和b的最大公约数
begin
if a mod b 0 then //如a不能被b整除
work := work(b, a mod b) //a和b的最大公约数等于b和a mod b 的最大公约数
else
work := b; //如a能被b整除,a和b的最大公约数就等于b
end;

begin
read(a, b); //读入a和b的值
writeln(work(a, b)); //work是自定义函数名(自己取的名字),它的功能在上面已作详细介绍
end.
输入:20 12
输出:___4____

英语翻译2、vara,b:integer;functionwork(a,b:integer):integer;beginif a mod b 0 thenwork := work(b,a mod b)elsework := b;end;beginread(a,b);writeln(work(a,b));end.输入:2012输出:___4____给我逐字逐句地翻译另外帮我解释这道题 斐波那契数列的第n项的值恰好大于10000,求n.vara,b,c,n:integer;begina:=0; b:=1; n:=2;while c 这是pascal里编的vara,b,c:integer;beginread(a,b);c:=a+b;readln;read(c);writeln(c);end; pascal从键盘上输入一个三角形的三条边长,计算出三角形的面积和周长这样写错在哪里啊?vara,b,c,p,m:integer;beginwrite('a,b,c=');readln(a,b,c);p:=(a+b+c)/2;m:=p*(p-a)*(p-b)*(p-c);writeln('s=',sqrt(m));writeln('l=',a+b+c); 求两个自然数,其和是667,最小公倍数与最大公约数之比是120:1(pascal)program d313;vara,b,g,l:integer;f:text;function gcd(m,n:integer):integer;var r:integer;beginwhile r0 dobeginr:=a mod b;if r=0 thenbegingcd:=b;break;end;a:=b;b:=r;e 解释程序(NOIP2009普及组初赛试题)vara,b:array[0..2] of integer;i,j,tmp:integer;beginfor i := 0 to 2 doread(b[i]);for i := 0 to 2 dobegina[i] := 0;for j := 0 to i dobegininc(a[i],b[j]);inc(b[a[i] mod 3],a[j]);end;end;tmp := 1;for i := 0 Pascal 斐波那契数列 求纠错!vara,b,c :array[1..100] of integer;n,i,j,x,w :integer;procedure f(n:longint);beginfillchar(a,sizeof(a),0);b := a;a[1]:=1; b[1]:=1; x:=0;for i:=1 to n-2 dobeginfor j:=1 to 100 dobeginc[j]:=a[j]+b[j]+x;x:=c[j] div 10 简单Pascal一道题vara,b:integer;function work(a,b:integer):integer;beginif a mod b 0 thenwork := work(b,a mod b)elsework := b;end;beginread(a,b);writeln(work(a,b));end.请问 work := work(b,a mod 英语翻译entity exmp1 isport(a:in Integer;b:out Integer);end;architecture behv of exmp1 issignal c1,c2:Integer;beginb Pascal 求长方体的体积,长、宽、高的值由键盘输入我输入了:vara,b,c,l:integer;beginread(a,b,c);l:=a*b*c;write(l);end.为什么没有用 (显示了出错信息) free pascal的noip2008火柴棒问题求解答program wu;vara,b,c,i,x:integer;o:array[0..999]of integer;beginb:=0;readln(a);a:=a-4;o[0]:=6;o[1]:=2;o[2]:=5;o[3]:=5;o[4]:=4;o[5]:=5;o[6]:=6;o[7]:=3;o[8]:=7;o[9]:=6;for i:=10 to 99 doo[i]:=o[i div 10]+o[i 帮忙看看哪错了(pascal)(数学黑洞6174 已知:一个任意的四位正整数.将数字重新组合成一个最vara :array[1..4]of integer;max4,max3,max2,max1,m,i,j,k:integer;flag:boolean;cha:longint;beginread(a[1],a[2],a[3],a[4]);flag 英语翻译var femte treåring och varannan femåring har börjat vara på internet.到底是多大的孩子在上网啊啊啊~ pascal有错误看看哪里错了?program paixu(input,output);vara,b,c,d :integer;beginreadln(a,b,c);if a>b then begind:=a;if c>d then write(c );write(d );wrire(b);elsewrite(d );write(c );write(b);endelse begind:=b;if c>d then write(c );write(d );wri 英语翻译constnum = 5;varn:integer;function r(n :integer) :integer;vari :integer;beginif n 英语翻译If n/42 is integer,which of the following is NOT necessarily 8 and integer?(A)n/2 (B)n/3 (C)n/4 (D)n/7 (E)n/14 Function hw(m As Long) As Boolean Dim a As Integer,b As Integer,c As Integer,d As Integer a = LeFunction hw(m As Long) As BooleanDim a As Integer,b As Integer,c As Integer,d As Integera = Left(m,1):b = Mid(m,2,1)c = _____________________d = _________ 英语翻译Given any integer 0