• 2021-04-14 问题

    求实数经的整数幂 。const maxn=100;var n,j,k:longint; x,y:extended; a:array[1..maxn] of integer;begin readln(x,n); k:=0; while n<>0 do begin _______ ①_________ ; a[k]:=n mod 2; n:=n div 2; end; __________②________; for j:=k downto 1 do begin y:= __________ ③____________ if__________ ④_________ then y:=y*x; end; writeln(y)end.[8分]

    求实数经的整数幂 。const maxn=100;var n,j,k:longint; x,y:extended; a:array[1..maxn] of integer;begin readln(x,n); k:=0; while n<>0 do begin _______ ①_________ ; a[k]:=n mod 2; n:=n div 2; end; __________②________; for j:=k downto 1 do begin y:= __________ ③____________ if__________ ④_________ then y:=y*x; end; writeln(y)end.[8分]

  • 1