高精度数的定义:typehp=array[1..maxlen] of integer;1.高精度加法procedure plus ( a,b:hp; var c:hp);var i,len:integer;
高精度数的定义:
type
hp=array[1..maxlen] of integer;
1.高精度加法
procedure plus ( a,b:hp; var c:hp);
var i,len:integer;
相关考题:
高精度除以低精度procedure devide(a:hp;b:longint; var c:hp; var d:longint);{c:=a div b; d:= a mod b}var i,len:integer;
5、对于多个输入参数的函数也可以使用递归。下面哪个递归定义是正确的自然数加法?也就是说,对于自然数x,y,plus x y给出x+y。A.plus :: Int - Int - Int plus 0 y = y plus x y = 1 + plus (x-1) yB.plus :: Int - Int - Int plus x 0 = x plus x y = 1 + plus x (y-1)C.plus :: Int - Int - Int plus x y = 1 + plus (x-1) y plus 0 y = yD.plus :: Int - Int - Int plus 0 y = y plus x y = 1 + plus (x-1) (y-1)