diff options
author | priyanka | 2015-06-24 15:03:17 +0530 |
---|---|---|
committer | priyanka | 2015-06-24 15:03:17 +0530 |
commit | b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch) | |
tree | ab291cffc65280e58ac82470ba63fbcca7805165 /659/CH6/EX6.1cs | |
download | Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2 Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip |
initial commit / add all books
Diffstat (limited to '659/CH6/EX6.1cs')
-rwxr-xr-x | 659/CH6/EX6.1cs/Casestudy6_1.sce | 29 | ||||
-rwxr-xr-x | 659/CH6/EX6.1cs/Casestudy6_1_output.PNG | bin | 0 -> 13002 bytes |
2 files changed, 29 insertions, 0 deletions
diff --git a/659/CH6/EX6.1cs/Casestudy6_1.sce b/659/CH6/EX6.1cs/Casestudy6_1.sce new file mode 100755 index 000000000..0420199b9 --- /dev/null +++ b/659/CH6/EX6.1cs/Casestudy6_1.sce @@ -0,0 +1,29 @@ +// Case Study:-Chapter 6, Page No:176
+// 1.Table of Binomial Coefficients
+
+MAX=10;
+printf("mx");
+for m=0:10
+ printf("%4d",m);
+end
+printf("\n-----------------------------------------------\n");
+m=0;
+//print the table of binomial coefficients for m=10
+//Computation using while loop
+while(m<=MAX)
+ printf("%2d",m);
+ x=0;
+ binom=1;
+ while(x<=m)
+ if(m==0|x==0)
+ printf("%4d",binom); //Print the result i.e. binom
+ else
+ binom=binom*(m-x+1)/x; //compute the binomial coefficient
+ printf("%4d",binom); //Print the result i.e. binom
+ end
+ x=x+1;
+ end
+ printf("\n");
+ m=m+1;
+end
+printf("-----------------------------------------------\n");
diff --git a/659/CH6/EX6.1cs/Casestudy6_1_output.PNG b/659/CH6/EX6.1cs/Casestudy6_1_output.PNG Binary files differnew file mode 100755 index 000000000..a9530cd20 --- /dev/null +++ b/659/CH6/EX6.1cs/Casestudy6_1_output.PNG |