Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me



Go Back   Dev Hardware ForumsSOFTWAREProgramming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Hardware Forums Sponsor:
  Trader Rating: 0 · #1  
Old April 27th, 2011, 06:47 PM
Hammoud Hammoud is offline
n00b DevH'er
Dev Hardware Newbie (0 - 499 posts)
 
Join Date: Apr 2011
Posts: 2 Hammoud User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 17 m 17 sec
Reputation Power: 0
Programming for Pascal's Triangle?

Basically, I'm trying to make a program that when I give it a row number for Pascal's Triangle, it will give me all of the coefficients
So far I have
:ClrHome
:Prompt N(for the Row Number)
:Promt R(This is always going to be 0, you'll see why I use it later)
:N nCr R ->Z
: Disp Z
:If (N-1)(Insert Does not Equal sign here :P)0
:Then N nCr (R+1)

What I'm trying to do is if the row number is 1, there is only 2 coefficients, so I want to to stop after those two instead of keep spitting 0's which would be a result of if I programmed it to go to like 100. So I want to to recognize that If N-1 = 0, stop, if not go on. How would I do that? O.o

Reply With Quote
  Trader Rating: 0 · #2  
Old April 28th, 2011, 07:08 PM
Hammoud Hammoud is offline
n00b DevH'er
Dev Hardware Newbie (0 - 499 posts)
 
Join Date: Apr 2011
Posts: 2 Hammoud User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 17 m 17 sec
Reputation Power: 0
Is this too hard for you guys??? O.o
26 views, 0 replies.
Please someone help!

Reply With Quote
  Trader Rating: 0 · #3  
Old May 1st, 2011, 02:11 PM
mphill's Avatar
mphill mphill is offline
untitled
Click here for more information
 
Join Date: Oct 2005
Location: Zagreb
Posts: 3,963 mphill User rank is General 133rd Grade (Above 100000 Reputation Level)mphill User rank is General 133rd Grade (Above 100000 Reputation Level)mphill User rank is General 133rd Grade (Above 100000 Reputation Level)mphill User rank is General 133rd Grade (Above 100000 Reputation Level)mphill User rank is General 133rd Grade (Above 100000 Reputation Level)mphill User rank is General 133rd Grade (Above 100000 Reputation Level)mphill User rank is General 133rd Grade (Above 100000 Reputation Level)mphill User rank is General 133rd Grade (Above 100000 Reputation Level)mphill User rank is General 133rd Grade (Above 100000 Reputation Level)mphill User rank is General 133rd Grade (Above 100000 Reputation Level)mphill User rank is General 133rd Grade (Above 100000 Reputation Level)mphill User rank is General 133rd Grade (Above 100000 Reputation Level)mphill User rank is General 133rd Grade (Above 100000 Reputation Level)mphill User rank is General 133rd Grade (Above 100000 Reputation Level)mphill User rank is General 133rd Grade (Above 100000 Reputation Level)mphill User rank is General 133rd Grade (Above 100000 Reputation Level)  Folding Points: 14729 Folding Title: Novice Folder
Time spent in forums: 3 Months 3 Weeks 5 Days 10 h 28 m 39 sec
Reputation Power: 9877
Send a message via ICQ to mphill
Facebook
What language is this ???????
__________________
Click Here ->    

Last edited by mphill : May 1st, 2011 at 04:17 PM.

Reply With Quote
Reply

Viewing: Dev Hardware ForumsSOFTWAREProgramming > Programming for Pascal's Triangle?


Developer Shed Affiliates

 


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
     
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap