(1)编程一函数,其功能是求一个长正整数各位数字之和。要求使用指针函数实现结果的返回。在主函数中进行测

日期:2011-09-26 23:43:05 人气:1

(1)编程一函数,其功能是求一个长正整数各位数字之和。要求使用指针函数实现结果的返回。在主函数中进行测

//求一个正整数的各位数字之和 .Delphi /Pascal代码。 Function ComputNum(aInt: integer):integer var ii:integer; ResultInt:integer; begin ResultInt:=0; if aInt<=0 then begin ResultInt:=0; end else begin for ii:=1 to length(
    A+
热门评论