summaryrefslogtreecommitdiff
path: root/3808/CH4/EX4.11/Ex4_11.sce
diff options
context:
space:
mode:
Diffstat (limited to '3808/CH4/EX4.11/Ex4_11.sce')
-rw-r--r--3808/CH4/EX4.11/Ex4_11.sce17
1 files changed, 17 insertions, 0 deletions
diff --git a/3808/CH4/EX4.11/Ex4_11.sce b/3808/CH4/EX4.11/Ex4_11.sce
new file mode 100644
index 000000000..c50d792be
--- /dev/null
+++ b/3808/CH4/EX4.11/Ex4_11.sce
@@ -0,0 +1,17 @@
+//Chapter 04:Number Theory and Cryptography
+
+clc;
+clear all;
+
+n=input("Enter the number:")
+c=0
+for i =2:n-1
+ if modulo(n,i)==0 then
+ c=c+1
+ end
+end
+if c==0 then
+ mprintf("%d is a prime number",n)
+else
+ mprintf("%d is not a prime number",n)
+end