From b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b Mon Sep 17 00:00:00 2001 From: priyanka Date: Wed, 24 Jun 2015 15:03:17 +0530 Subject: initial commit / add all books --- 659/CH6/EX6.1cs/Casestudy6_1.sce | 29 +++++++++++++++++++++++++++++ 659/CH6/EX6.1cs/Casestudy6_1_output.PNG | Bin 0 -> 13002 bytes 2 files changed, 29 insertions(+) create mode 100755 659/CH6/EX6.1cs/Casestudy6_1.sce create mode 100755 659/CH6/EX6.1cs/Casestudy6_1_output.PNG (limited to '659/CH6/EX6.1cs') 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 new file mode 100755 index 000000000..a9530cd20 Binary files /dev/null and b/659/CH6/EX6.1cs/Casestudy6_1_output.PNG differ -- cgit