Sorry if the formatting is weird I'm on my mobile and this is my first time posting here

But basically what I'm trying to do is write a program to display a table for the function (nCx)(p^x)((1-p)^(n-x)
Where I prompt for "n" and "p", for x values of {0,1,2....15}

I can get it to work if I prompt all the variables but what I'm trying to do is have the program display a table of y values after inputting the n and p values obviously on that interval so I can scroll through and read the values without having to do each one individually and not having to put the equation in the "Y=" menu every time.

I have tried using tblinput and tbldisp but I just can't iron out the kinks. A full program write would be amazing but any advice or tips id also appreciate.

Also little notes on why to do each line of the program would be very interesting to me. I love trying to do little things like this on my own but my knowledge is very minimal xD
Well, this may or may not be exactly what you are looking for, but it should work:


Code:

:ClrHome                       ; Clear Screen
:0→TblStart                   ; Start Table at 0
:1→ΔTbl                        ; Increment Table By 1
:Input "N:",N                 ; Get N
:Input "P:",P                  ; Get P
:"binompdf(N,P,X→Y₁    ; Store Equation, Which Looks Like A Binomial Distibution
:DispTable                     ; Display The Table
:DelVar Y₁ClrHome        ; Clear Y1= & Clear Screen


It will start at x=0, and will keep trying to display the table until it reaches the maximum value. Please let me know if this works for you! Smile
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement