summaryrefslogtreecommitdiff
path: root/3544/CH2/EX2.15/Ex2_15.sce
diff options
context:
space:
mode:
Diffstat (limited to '3544/CH2/EX2.15/Ex2_15.sce')
-rw-r--r--3544/CH2/EX2.15/Ex2_15.sce19
1 files changed, 19 insertions, 0 deletions
diff --git a/3544/CH2/EX2.15/Ex2_15.sce b/3544/CH2/EX2.15/Ex2_15.sce
new file mode 100644
index 000000000..7f2573ecc
--- /dev/null
+++ b/3544/CH2/EX2.15/Ex2_15.sce
@@ -0,0 +1,19 @@
+// Vignere tableau
+
+a = ascii('A')
+
+// Print header
+printf(" \t")
+for i=1:26
+ printf("%c ",ascii(a+i-1))
+end
+printf("\n\n")
+//end of header
+
+for i=1:26
+ printf("%c\t",ascii(a+i-1))
+ for j=0:25
+ printf("%c ",ascii( a + modulo( i+j+key, 26 ) ) )
+ end
+ printf("\n")
+end