

   dnt(N):-N>0,
          
          M is N-1,

          write('*'),

          dnt(M).

   cd(N):- N>0,
      
        write(N),

        M is N-1,

        cd(M).



   Nsum(N):-N>0,

         S is 0,
          
         S is S+N,

         M is N-1,

         Nsum(M) ,

         write(S).

   add(X,Y):- Z is X+Y,

               write(Z).