Difference between revisions of "CSC220 Homework 2 2010"

From dftwiki3
Jump to: navigation, search
(Problem #1)
Line 9: Line 9:
 
=Problem #1=
 
=Problem #1=
  
* Write a Php program that displays the first 10 rows of Pascal's Triangle in a table.
+
* Write a Php program that displays the first 10 rows of Pascal's Triangle in a table using loops and arrays.  The first 5 lines of the array are shown below.
  
 
<table border="1">
 
<table border="1">
Line 18: Line 18:
 
<tr><td>1</td><td>4&nbsp;</td><td>6&nbsp;</td><td>4&nbsp;</td><td>1&nbsp;</td></tr>
 
<tr><td>1</td><td>4&nbsp;</td><td>6&nbsp;</td><td>4&nbsp;</td><td>1&nbsp;</td></tr>
 
</table>
 
</table>
 +
 +
* Store your Php program in a file called hw2_1.php and submit it as follows:
 +
 +
  submit hw2 hw2_1.php
  
 
<br />
 
<br />

Revision as of 13:50, 22 September 2010

--D. Thiebaut 18:45, 22 September 2010 (UTC)


Contents

Page under construction!
UnderConstruction.jpg

Problem #1

  • Write a Php program that displays the first 10 rows of Pascal's Triangle in a table using loops and arrays. The first 5 lines of the array are shown below.
    
1   
1  
1 
1
  • Store your Php program in a file called hw2_1.php and submit it as follows:
 submit hw2 hw2_1.php