summaryrefslogtreecommitdiff
path: root/182/CH5/EX5.6
diff options
context:
space:
mode:
Diffstat (limited to '182/CH5/EX5.6')
-rwxr-xr-x182/CH5/EX5.6/5_6.txt1
-rwxr-xr-x182/CH5/EX5.6/exampke5_6.sce17
2 files changed, 18 insertions, 0 deletions
diff --git a/182/CH5/EX5.6/5_6.txt b/182/CH5/EX5.6/5_6.txt
new file mode 100755
index 000000000..abc2f6952
--- /dev/null
+++ b/182/CH5/EX5.6/5_6.txt
@@ -0,0 +1 @@
+6.for less 1percent error,use n=7 \ No newline at end of file
diff --git a/182/CH5/EX5.6/exampke5_6.sce b/182/CH5/EX5.6/exampke5_6.sce
new file mode 100755
index 000000000..f0231db72
--- /dev/null
+++ b/182/CH5/EX5.6/exampke5_6.sce
@@ -0,0 +1,17 @@
+
+// example 5-6 in page 133
+clc;
+//Given data
+//error should be less thsn 1%
+// for less than 1% error count>=100
+n=6;
+N=0;
+while(N<100)
+N=(2^n)-1;//count value
+if(N<100)
+n=n+1;//increment n and check weather N has exceeded 100
+end
+end
+printf("for less 1percent error,use n=%d\n",n);
+//end
+// for less 1percent error,use n=7 \ No newline at end of file