ChipMaster's bwBASIC This also includes history going back to v2.10. *WARN* some binary files might have been corrupted by CRLF.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

17 lines
415 B

  1. 100 dim pascal(14,14)
  2. 110 pascal(1,1) = 1
  3. 120 for i = 2 to 14
  4. 130 pascal(i,1) = 1
  5. 140 for j = 2 to i
  6. 150 pascal(i,j) = pascal(i-1,j)+pascal(i-1,j-1)
  7. 160 next j
  8. 170 next i
  9. 180 for i = 1 to 14
  10. 190 print i-1; ": ";
  11. 200 for j = 1 to i
  12. 210 print pascal(i,j);
  13. 220 next j
  14. 230 print
  15. 240 next i
  16. 250 end