用编程语言编程实现一个数学问题,并输出结果。

日期:2016-08-17 21:44:01 人气:2

用编程语言编程实现一个数学问题,并输出结果。

用pascal var x,y:longint; function s(p,q:longint):longint; begin if (p<q) or (q<=0) then s:=0 else if (p=q) or (q=1) then s:=1 else if (p>q) and (q>1) then s:=s(p-1,q-1)+q*s(p-1,q); exit(s); end; begin readln(x,y); writeln(s(x,y)); end
    A+
热门评论