编程题

Program  exp3 (input,output);                                       

Const  N=10;

Var 

  S,I : integer;

Function  CO(I1:integer) : integer;

   VAR J1,S1 : integer;                           

   Begin                                          

     S1:=N;

       For J1:= (N-1)  downto  (N-I1+1)  do      

         S1:= S1*J1  div  (N-J1+1);                

       CO:=S1

     End;

 Begin                                      

   S:=N+1;                                   

   For I:= 2  to  N  do  S:=S + CO(I);

Writeln(‘S=’,S);

  End.

查看答案
赣ICP备20007335号-2