summaryrefslogtreecommitdiff
path: root/45/CH15/EX15.4/example_15_4.sce
diff options
context:
space:
mode:
Diffstat (limited to '45/CH15/EX15.4/example_15_4.sce')
-rwxr-xr-x45/CH15/EX15.4/example_15_4.sce22
1 files changed, 22 insertions, 0 deletions
diff --git a/45/CH15/EX15.4/example_15_4.sce b/45/CH15/EX15.4/example_15_4.sce
new file mode 100755
index 000000000..632a0589c
--- /dev/null
+++ b/45/CH15/EX15.4/example_15_4.sce
@@ -0,0 +1,22 @@
+//example 15.4
+clc;
+clear;
+//f=input('Enter the input square wave signal frequency in kHz:');
+//t=input('Enter the gate enble time in seconds ' );
+//first part :
+f=7.50;
+t=0.1;
+format('v',18);
+m=t*f*1000; //making neccesary calculations
+printf('For t = %f seconds\n',t); // displaying results
+printf('The counter will count up to : %f\n',m);
+//part2
+t=1;
+printf('\n\nFor t = %f seconds\n',t);
+m=t*f*1000;
+printf('The counter will count up to : %f\n',m);
+//part3
+t=10;
+m=t*f*1000;
+printf('\n\nFor t = %f seconds\n',t);
+printf('The counter will count up to : %f\n',m);