Results 1 to 2 of 2

Thread: Sumensions and Triangular numbers

  1. #1
    Join Date
    Feb 2006
    Location
    California-Foster City
    Posts
    742
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default Sumensions and Triangular numbers

    Uses Sumensions to get the triangluar numbers

    Yes the sumension thing is just my facotrial function edited


    For Permutation or combination or factorial help go:


    here




    PHP Code:
    const

      
    Tri 3// the numberth triangluar number to get


    function Simension(x:Integer):Integer;
    var
      
    GA:Integer;
      
    begin
        A
    :=x;
        for 
    G:= 1 to x-do
          
    begin
            a
    := a+(x-G);
          
    end;
        
    Result:= A;
    end;



    function 
    GetTriangularNumber(x:Integer):Integer;
    begin
      Result
    :=Simension(x)
    end;
      

    begin
      Writeln
    (IntToStr(GetTriangularNumber(Tri)))
    end
    The Welcoming Party
    Don't be a Fakawi! Get 25 hours of sleep a day!

  2. #2
    Join Date
    Apr 2006
    Posts
    710
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Nice, even if i don't know what is that triangular shit

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 10
    Last Post: 05-17-2009, 10:23 PM
  2. Weird numbers...
    By Nexhou in forum Blogs and Writing
    Replies: 12
    Last Post: 09-10-2008, 04:52 PM
  3. How to get numbers???
    By RusinaRange in forum OSR Help
    Replies: 1
    Last Post: 12-05-2007, 01:29 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •